code: def test_raise_invalid_tp_composition(self):
      with self.assertRaisesRegex(
          RuntimeError,
          r"Found TP device_mesh on the \d dimension of its parent mesh",
      ):
          mesh_2d = init_device_mesh(
              self.device_type,
              (2, self.world_size // 2),
              mesh_dim_names=("tp", "dp"),
          )
          parallelize_plan = {
              "net1": ColwiseParallel(),
              "net2": RowwiseParallel(),
          }
          model_2d = parallelize_module(
              SimpleModel().cuda(), mesh_2d["tp"], parallelize_plan
          )
  
imports: import io
  from copy import deepcopy
  import torch
  import torch.distributed
  import torch.nn
  import torch.nn.functional
  from torch.distributed._tensor import DTensor, init_device_mesh, Replicate, Shard
  from torch.distributed.checkpoint.state_dict import get_optimizer_state_dict, set_optimizer_state_dict
  from torch.distributed.fsdp import FullyShardedDataParallel
  from torch.distributed.fsdp._common_utils import _get_module_fsdp_state, clean_tensor_name
  from torch.distributed.fsdp.fully_sharded_data_parallel import StateDictType
  from torch.distributed.tensor.parallel import ColwiseParallel, parallelize_module, RowwiseParallel
  from torch.distributed.tensor.parallel.fsdp import DTensorExtensions
  from torch.distributed.tensor.parallel.input_reshard import input_reshard
  from torch.testing._internal.common_distributed import skip_if_lt_x_gpu
  from torch.testing._internal.common_utils import instantiate_parametrized_tests, parametrize, run_tests
  from torch.testing._internal.distributed._tensor.common_dtensor import DTensorTestBase, with_comms
label_desc: Use image node_id 2 for calling the TestNew2dParallelTraining obj's underlying member method code with example usage: obj.test_raise_invalid_tp_composition() without return types