class_docstr: Resolving AutoDist DeviceSpec to TensorFlow DeviceSpec given a cluster.
docstr: Initialize the DeviceResolver.
  
  Args:
      cluster (Cluster): The cluster with which to resolve devices.
code: def __init__(self, cluster):
      """
      Initialize the DeviceResolver.
  
      Args:
          cluster (Cluster): The cluster with which to resolve devices.
      """
      self._cluster = cluster
      self._address_to_tasks = self._get_address_to_tasks(cluster)
  
file_path: autodist/autodist/kernel/device/resolver.py
imports: from collections import defaultdict
  from google.protobuf.pyext._message import RepeatedScalarContainer
  from tensorflow.python.framework import device_spec
  from autodist.resource_spec import DeviceSpec
label_desc: Use image node_id 1 to create a new DeviceResolver object  with example: obj = DeviceResolver(cluster)