def get_pods():
        """Return list of pods matching given labels"""
        return [
            pod
            for pod in kube.list_namespaced_pod(namespace=K8S_NAMESPACE).items
            if all(
                pod.metadata.labels.get(key) == value for key, value in labels.items()
            )
        ]
Return list of pods matching given labels
binderhub/tests/conftest.py