code: def cluster_resources(self):
          
          resources = defaultdict(int)
          clients = self.client_table()
          for client in clients:
              # Only count resources from live clients.
              if client["IsInsertion"]:
                  for key, value in client["Resources"].items():
                      resources[key] += value
  
          return dict(resources)
docs: Get the current total cluster resources.
  
          Note that this information can grow stale as nodes are added to or
          removed from the cluster.
  
          Returns:
              A dictionary mapping resource name to the total quantity of that
                  resource in the cluster.