ref:
When filtering out sidecar containers leaves exactly one candidate (the expected success case), the function raises "No container names left" instead of returning the candidate. When candidates is empty, it falls through to candidates[0] which raises an IndexError.
Expected: if len(candidates) == 0 so that one remaining candidate is returned successfully.