'Returns: list of pods not in a ready and running state'

@staticmethod
def not_running_pods(pods):

    return [pod for pod in pods if ((not pod.get('status', {}).get('containerStatuses')) or any(((container['ready'] is False) for container in pod['status']['containerStatuses'])) or (not any((((condition['type'] == 'Ready') and (condition['status'] == 'True')) for condition in pod['status'].get('conditions', [])))))]
