code: def _test_sharding_from_meta(  # noqa C901
      tables: List[EmbeddingBagConfig],
      rank: int,
      world_size: int,
      sharder: ModuleSharder[nn.Module],
      backend: str,
      local_size: Optional[int] = None,
      use_fp_collection: bool = False,
  ) -> None:
      with MultiProcessContext(
          rank, world_size, backend, local_size
      ) as ctx:
          (
              sparse_arch,
              sharded_sparse_arch,
          ) = get_unsharded_and_sharded_module(
              tables,
              sharder,
              use_dmp=True,
              use_fp_collection=use_fp_collection,
              init_device=torch.device("meta"),
              ctx=ctx,
          )
  
          state_dict = sharded_sparse_arch.state_dict()
          for key, param in state_dict.items():
              if "_feature_processors" not in key:
                  continue
              assert (
                  not param.is_meta
              ), f"Parameter {key} is still meta after sharding"
              torch.testing.assert_close(param, torch.ones_like(param))
  
imports: import copy
  import unittest
  from operator import xor
  from typing import List, Optional, Tuple
  import torch
  import torch.nn
  from hypothesis import given, settings, strategies, Verbosity
  from torch.distributed.optim import _apply_optimizer_in_backward
  from torchrec import distributed
  from torchrec.distributed.fp_embeddingbag import FeatureProcessedEmbeddingBagCollectionSharder
  from torchrec.distributed.model_parallel import DistributedModelParallel
  from torchrec.distributed.shard import _shard_modules
  from torchrec.distributed.sharding_plan import column_wise, construct_module_sharding_plan, data_parallel, table_wise
  from torchrec.distributed.test_utils.multi_process import MultiProcessContext, MultiProcessTestBase
  from torchrec.distributed.test_utils.test_sharding import copy_state_dict
  from torchrec.distributed.tests.test_fp_embeddingbag_utils import create_module_and_freeze
  from torchrec.distributed.types import ModuleSharder, ShardingEnv, ShardingPlan
  from torchrec.modules.embedding_configs import EmbeddingBagConfig
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor
  from torchrec.test_utils import skip_if_asan_class
label_desc: Use image node_id 3 for calling a global function with example usage: _test_sharding_from_meta(tables, rank, world_size, sharder, backend, local_size, use_fp_collection) without return types