code: def test_full_shard_math_ops(self):
      mesh_shape = (2, self.world_size // 2)
      mesh = DeviceMesh(
          self.device_type,
          torch.arange(self.world_size).reshape(*mesh_shape),
      )
      global_tensor = torch.ones(4, 4)
      double_shard_tensor = distribute_tensor(
          global_tensor, mesh, [Shard(0), Shard(0)]
      )
      fully_shard_tensor = distribute_tensor(
          global_tensor, mesh, [Shard(0), Shard(1)]
      )
  
      # for op in [torch.add, torch.sub, torch.mul, torch.div]:
      for op in [torch.add, torch.sub, torch.mul, torch.div]:
          expect_rs = op(global_tensor, 2)
          actual_rs = op(double_shard_tensor, 2).redistribute(
              mesh, [Replicate(), Replicate()]
          )
          actual_local_res = actual_rs.to_local()
          self.assertEqual(actual_local_res, expect_rs)
  
file_path: pytorch/test/distributed/_tensor/test_math_ops.py
imports: import copy
  import itertools
  import torch
  from torch.distributed._tensor import DeviceMesh, distribute_module, distribute_tensor
  from torch.distributed._tensor.debug import CommDebugMode
  from torch.distributed._tensor.ops.utils import is_tensor_partial
  from torch.distributed._tensor.placement_types import Replicate, Shard
  from torch.testing._internal.common_utils import run_tests
  from torch.testing._internal.distributed._tensor.common_dtensor import DTensorTestBase, skip_unless_torch_gpu, with_comms
label_desc: Use image node_id 6 for calling the DistMathOpsTest obj's underlying member method code with example usage: obj.test_full_shard_math_ops() without return types