def V1NetworkPolicyList(
    amount: int, namespace: str) -> client.V1NetworkPolicyList:
  """Make Kubernetes API NetworkPolicy list, see V1NetworkPolicyList.

  https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1NetworkPolicyList.md
  """
  items = [
      V1NetworkPolicy('netpol-{0:d}'.format(i), namespace)
      for i in range(amount)
  ]
  return client.V1NetworkPolicyList(items=items)
Make Kubernetes API NetworkPolicy list, see V1NetworkPolicyList.

https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1NetworkPolicyList.md
tests/providers/kubernetes/k8s_mocks.py