code: def test_sharding_fused_ebc_as_top_level(self) -> None:
      os.environ["RANK"] = "0"
      os.environ["WORLD_SIZE"] = "1"
      os.environ["LOCAL_WORLD_SIZE"] = "1"
      os.environ["MASTER_ADDR"] = str("localhost")
      os.environ["MASTER_PORT"] = str(get_free_port())
      os.environ["NCCL_SOCKET_IFNAME"] = "lo"
  
      if torch.cuda.is_available():
          curr_device = torch.device("cuda:0")
          torch.cuda.set_device(curr_device)
          backend = "nccl"
      else:
          curr_device = torch.device("cpu")
          backend = "gloo"
      dist.init_process_group(backend=backend)
  
      embedding_dim = 128
      num_embeddings = 256
      ebc = FusedEmbeddingBagCollection(
          device=torch.device("meta"),
          tables=[
              EmbeddingBagConfig(
                  name="large_table",
                  embedding_dim=embedding_dim,
                  num_embeddings=num_embeddings,
                  feature_names=["my_feature"],
                  pooling=PoolingType.SUM,
              ),
          ],
          optimizer_type=torch.optim.SGD,
          optimizer_kwargs={"lr": 0.02},
      )
  
      model = DistributedModelParallel(ebc, device=curr_device)
  
      self.assertTrue(
          isinstance(model.module, ShardedFusedEmbeddingBagCollection)
      )
  
imports: import os
  import unittest
  from collections import defaultdict
  from typing import Any, Callable, cast, Dict, List, Optional, OrderedDict, Tuple
  import numpy
  import torch
  import torch.nn
  from fbgemm_gpu.split_embedding_configs import EmbOptimType
  from hypothesis import given, settings, strategies, Verbosity
  from torch import distributed
  from torch.distributed._shard.sharded_tensor import ShardedTensor
  from torchrec import distributed
  from torchrec.distributed.embedding_types import EmbeddingComputeKernel, EmbeddingTableConfig
  from torchrec.distributed.embeddingbag import EmbeddingBagCollectionSharder, ShardedEmbeddingBagCollection
  from torchrec.distributed.fused_embeddingbag import ShardedFusedEmbeddingBagCollection
  from torchrec.distributed.model_parallel import DistributedModelParallel
  from torchrec.distributed.planner import EmbeddingShardingPlanner, ParameterConstraints, Topology
  from torchrec.distributed.sharding_plan import get_default_sharders
  from torchrec.distributed.test_utils.test_model import _get_default_rtol_and_atol, ModelInput, TestSparseNN, TestSparseNNBase
  from torchrec.distributed.test_utils.test_sharding import copy_state_dict, create_test_sharder, gen_model_and_input, ModelInputCallable, SharderType
  from torchrec.distributed.types import ModuleSharder, ShardingEnv, ShardingPlan, ShardingType
  from torchrec.modules.embedding_configs import BaseEmbeddingConfig, EmbeddingBagConfig, PoolingType
  from torchrec.modules.embedding_modules import EmbeddingBagCollection
  from torchrec.modules.fused_embedding_modules import FusedEmbeddingBagCollection
  from torchrec.test_utils import get_free_port, seed_and_log
label_desc: Use image node_id 3 for calling the ModelParallelSparseOnlyBase obj's underlying member method code with example usage: obj.test_sharding_fused_ebc_as_top_level() without return types