code: def test_from_local_sub_mesh(self):
      mesh = DeviceMesh(self.device_type, [0, 2])
      local_tensor = torch.ones(3, 4)
  
      dtensor = DTensor.from_local(local_tensor, mesh, [Shard(0)])
      self.assertEqual(dtensor.size(), torch.Size([6, 4]))
  
      self.sub_mesh_assert_equal(
          mesh.mesh,
          torch.ones(3, 4),
          torch.tensor([]),
          dtensor.to_local(),
      )
  
      # test dtensor created in submesh, the operation should only
      # be applied to the local shard inside the mesh, not the whole
      # world, so only 0/2 really run the computation
      dtensor = dtensor + 2
  
      self.sub_mesh_assert_equal(
          mesh.mesh,
          torch.ones(3, 4) + 2,
          torch.tensor([]),
          dtensor.to_local(),
      )
  
imports: import torch
  import torch.nn.functional
  from numpy.testing import assert_array_equal
  from torch.distributed._functional_collectives import AsyncCollectiveTensor
  from torch.distributed._tensor import DeviceMesh, distribute_tensor, DTensor, init_device_mesh
  from torch.distributed._tensor.placement_types import _Partial, Replicate, Shard
  from torch.distributed.tensor.parallel import ColwiseParallel, parallelize_module, RowwiseParallel
  from torch.testing._internal.common_utils import run_tests
  from torch.testing._internal.distributed._tensor.common_dtensor import DTensorTestBase, with_comms
label_desc: Use image node_id 8 for calling the DTensorMeshTest obj's underlying member method code with example usage: obj.test_from_local_sub_mesh() without return types