  def ListReplicaSets(
      self, namespace: Optional[str] = None) -> List[workloads.K8sReplicaSet]:
    """Lists the replica sets in this cluster.

    Args:
      namespace (str): Optional. The namespace in which to list the replica
          sets. If not specified, replica sets are listed in all namespaces.

    Returns:
      List[workloads.K8sReplicaSet]: The list of replica sets.
    """
    api = self._Api(client.AppsV1Api)
    if namespace is not None:
      replica_sets = api.list_namespaced_replica_set(namespace)
    else:
      replica_sets = api.list_replica_set_for_all_namespaces()
    return [
        workloads.K8sReplicaSet(
            self._api_client,
            replica_set.metadata.name,
            replica_set.metadata.namespace)
        for replica_set in replica_sets.items
    ]
Lists the replica sets in this cluster.

Args:
namespace (str): Optional. The namespace in which to list the replica
sets. If not specified, replica sets are listed in all namespaces.

Returns:
List[workloads.K8sReplicaSet]: The list of replica sets.
libcloudforensics/providers/kubernetes/cluster.py