code: def test_sharded_tensor_reshard_errors(self):
      specs = _chunk_sharding_specs_list_for_test([0, 1], seed=6)
      spec, reshard_spec = specs[0], specs[1]
      enumerable_sharding_spec = EnumerableShardingSpec(
          [
              ShardMetadata(
                  shard_offsets=[0, 0],
                  shard_sizes=[5, 5],
                  placement="rank:0/cuda:0",
              ),
              ShardMetadata(
                  shard_offsets=[5, 0],
                  shard_sizes=[5, 5],
                  placement="rank:1/cuda:1",
              ),
          ]
      )
      st = sharded_tensor.rand(spec, 24, 12)
      with self.assertRaisesRegex(
          NotImplementedError,
          "Only ChunkShardingSpec supported for reshard.",
      ):
          st.reshard(enumerable_sharding_spec)
      st._local_shards = [st.local_shards()[0], st.local_shards()[0]]
      with self.assertRaisesRegex(
          NotImplementedError,
          "Only single local shard supported for reshard.",
      ):
          st.reshard(reshard_spec)
  
file_path: pytorch/test/distributed/_shard/sharded_tensor/test_sharded_tensor_reshard.py
imports: import sys
  from itertools import product
  import torch
  from torch.distributed._shard import sharded_tensor, _shard_tensor
  from torch.distributed._shard.sharding_spec import EnumerableShardingSpec, ShardMetadata
  from torch.testing._internal.common_distributed import requires_nccl, skip_if_lt_x_gpu
  from torch.testing._internal.common_utils import TEST_WITH_DEV_DBG_ASAN, run_tests
  from torch.testing._internal.distributed._shard.sharded_tensor import ShardedTensorTestBase, with_comms
  from torch.testing._internal.distributed._shard.sharded_tensor._test_st_common import _chunk_sharding_specs_list_for_test
label_desc: Use image node_id 3 for calling the TestReshard obj's underlying member method code with example usage: obj.test_sharded_tensor_reshard_errors() without return types