code: def get_all_bands(
      self, role: NodeRole = None, statuses: Set[NodeStatus] = None
  ) -> Dict[BandType, Resource]:
      statuses = statuses or {NodeStatus.READY}
      role = role or NodeRole.WORKER
      nodes = self._role_to_nodes.get(role, [])
      band_resource = dict()
      for node in nodes:
          if self._node_infos[node].status not in statuses:
              continue
          node_resource = self._node_infos[node].resource
          for resource_type, info in node_resource.items():
              if resource_type.startswith("numa"):
                  # cpu
                  band_resource[(node, resource_type)] = Resource(
                      num_cpus=info["cpu_total"],
                      mem_bytes=info["memory_total"],
                  )
              else:  # pragma: no cover
                  assert resource_type.startswith("gpu")
                  band_resource[(node, resource_type)] = Resource(
                      num_gpus=info["gpu_total"]
                  )
      return band_resource
  
file_path: mars/mars/services/cluster/supervisor/node_info.py
imports: import time
  from collections import defaultdict
  from typing import Dict, List, Optional, Set
  from ....None import oscar
  from ....resource import Resource
  from ....typing import BandType
  from ...core import NodeRole
  from ..core import NodeInfo, WatchNotifier, NodeStatus
label_desc: Use image node_id 3 for calling the NodeInfoCollectorActor obj's underlying member method code with example usage: obj.get_all_bands(role, statuses) and returns: band_resource