class_docstr: A logical view of a physical cluster. For example, we could view a physical cluster
  with 16 devices as a device mesh with shape (2, 2, 4) or (4, 4).
  
  Arguments:
      physical_mesh_id (torch.Tensor): physical view of the devices in global rank.
      logical_mesh_id (torch.Tensor): logical view of the devices in global rank.
      mesh_shape (torch.Size, optional): shape of logical view.
      mesh_alpha (List[float], optional): coefficients used for computing
          communication cost (default: None)
      mesh_beta (List[float], optional): coefficients used for computing
          communication cost (default: None)
      init_process_group (bool, optional): initialize logical process group
          during initializing the DeviceMesh instance if the init_process_group set to True.
          Otherwise, users need to call create_process_groups_for_logical_mesh manually to init logical process group.
          (default: False)
      device (str): the device for the process groups used by the DeviceMesh instance. (default: 'cuda')
docstr: Return the logical mesh id.
docstr_tok: ["Return","the","logical","mesh","id","."]
code: def logical_mesh_id(self) -> torch.Tensor:
      """
      Return the logical mesh id.
      """
      return self._logical_mesh_id
  
imports: import operator
  from dataclasses import dataclass
  from functools import reduce
  from typing import Dict, List, Union
  import torch
  import torch.distributed
  from torch.distributed import ProcessGroup
label_desc: Use image node_id 4 for calling the DeviceMesh obj's underlying member method code with example usage: obj.logical_mesh_id() and returns: self