class_docstr: Synchronous training across multiple replicas on one machine.
  
  This strategy is typically used for training on one machine with multiple
  accelerators (GPUs/TPUs).
  
  For example, a variable created under a `MirroredStrategy` is a distributed
  variable with layout replicated on each dimension. The variables will be
  placed on the `mesh` that is specified in the __init__.
class_docstr_tok: ["Synchronous","training","across","multiple","replicas","on","one","machine",".","This","strategy","is","typically","used","for","training","on","one","machine","with","multiple","accelerators","(","GPUs\/TPUs",")",".","For","example",",","a","variable","created","under","a","`","MirroredStrategy","`","is","a","distributed","variable","with","layout","replicated","on","each","dimension",".","The","variables","will","be","placed","on","the","`","mesh","`","that","is","specified","in","the","__init__","."]
code: def _build_mesh_from_device_list(cls, devices):
      if devices:
          device_type = tf_device.DeviceSpec.from_string(
              devices[0]
          ).device_type
          dtensor_util.initialize_accelerator_system_once(device_type)
          mesh = mesh_util.create_mesh(
              mesh_dims=[
                  (
                      dtensor_util.DEFAULT_BATCH_MESH_DIM_NAME,
                      len(devices),
                  )
              ],
              devices=devices,
          )
      else:
          # Trying to detect if there is any GPU/TPUs attached.
          device_type = d_config.preferred_device_type()
          devices = d_config.local_devices(device_type)
          dtensor_util.initialize_accelerator_system_once(device_type)
          mesh = mesh_util.create_mesh(
              mesh_dims=[
                  (
                      dtensor_util.DEFAULT_BATCH_MESH_DIM_NAME,
                      len(devices),
                  )
              ],
              device_type=device_type,
          )
      return mesh
  
file_path: tensorflow/tensorflow/python/distribute/experimental/mirrored_strategy.py
imports: from tensorflow.dtensor.python import config
  from tensorflow.dtensor.python import mesh_util
  from tensorflow.python.distribute import distribute_lib
  from tensorflow.python.distribute.experimental import dtensor_strategy_extended
  from tensorflow.python.distribute.experimental import dtensor_util
  from tensorflow.python.framework import device
label_desc: Use image node_id 3 for calling the MirroredStrategy obj's underlying member method code with example usage: obj._build_mesh_from_device_list(cls, devices) and returns: mesh