code: def test_cw_sequence(self, weight_dtype: torch.dtype) -> None:
      num_embeddings = 4
      emb_dim = 512
      emb_dim_4 = emb_dim // 4
      world_size = 2
      batch_size = 2
      local_device = torch.device("cuda:0")
  
      topology: Topology = Topology(
          world_size=world_size, compute_device="cuda"
      )
      mi = TestModelInfo(
          dense_device=local_device,
          sparse_device=local_device,
          num_features=2,
          num_float_features=10,
          num_weighted_features=0,
          topology=topology,
      )
  
      mi.planner = EmbeddingShardingPlanner(
          topology=topology,
          batch_size=batch_size,
          enumerator=EmbeddingEnumerator(
              topology=topology,
              batch_size=batch_size,
              estimator=[
                  EmbeddingPerfEstimator(
                      topology=topology, is_inference=True
                  ),
                  EmbeddingStorageEstimator(topology=topology),
              ],
          ),
      )
  
      mi.tables = [
          EmbeddingConfig(
              num_embeddings=num_embeddings,
              embedding_dim=emb_dim,
              name=f"table_{i}",
              feature_names=[f"feature_{i}"],
          )
          for i in range(mi.num_features)
      ]
  
      mi.model = KJTInputWrapper(
          module_kjt_input=torch.nn.Sequential(
              EmbeddingCollection(
                  tables=mi.tables,
                  device=mi.sparse_device,
              )
          )
      )
  
      mi.model.training = False
      mi.quant_model = quantize(
          mi.model,
          inplace=False,
          quant_state_dict_split_scale_bias=True,
          weight_dtype=weight_dtype,
      )
      non_sharded_model = mi.quant_model
      expected_shards = [
          [
              ((0, 0, num_embeddings, emb_dim_4), "rank:0/cuda:0"),
              (
                  (0, 1 * emb_dim_4, num_embeddings, emb_dim_4),
                  "rank:1/cuda:1",
              ),
              (
                  (0, 2 * emb_dim_4, num_embeddings, emb_dim_4),
                  "rank:0/cuda:0",
              ),
              (
                  (0, 3 * emb_dim_4, num_embeddings, emb_dim_4),
                  "rank:1/cuda:1",
              ),
          ],
      ] * 2
      sharded_model = shard_qec(
          mi,
          sharding_type=ShardingType.COLUMN_WISE,  # column wise sharding the model
          device=local_device,
          expected_shards=expected_shards,
      )
      inputs = [
          model_input_to_forward_args_kjt(inp.to(local_device))
          for inp in prep_inputs(
              mi, world_size, batch_size, long_indices=False
          )
      ]
  
      sharded_model.load_state_dict(non_sharded_model.state_dict())
      sharded_output = sharded_model(*inputs[0])
      non_sharded_output = non_sharded_model(*inputs[0])
      assert_close(sharded_output, non_sharded_output)
  
      weights_spec: Dict[str, WeightSpec] = sharded_tbes_weights_spec(
          sharded_model
      )
      assert_weight_spec(
          weights_spec,
          expected_shards,
          "_module_kjt_input.0",
          "embeddings",
          ["table_0", "table_1"],
          ShardingType.COLUMN_WISE.value,
      )
  
imports: import math
  import unittest
  from typing import Dict, List, Tuple
  import hypothesis.strategies
  import torch
  from hypothesis import given, settings
  from torchrec import EmbeddingBagConfig, EmbeddingCollection, EmbeddingConfig, KeyedJaggedTensor
  from torchrec.distributed.embedding_types import EmbeddingComputeKernel, ShardingType
  from torchrec.distributed.planner import EmbeddingShardingPlanner, Topology
  from torchrec.distributed.planner.enumerators import EmbeddingEnumerator
  from torchrec.distributed.planner.shard_estimators import EmbeddingPerfEstimator, EmbeddingStorageEstimator
  from torchrec.distributed.quant_embeddingbag import QuantFeatureProcessedEmbeddingBagCollectionSharder
  from torchrec.distributed.quant_state import sharded_tbes_weights_spec, WeightSpec
  from torchrec.distributed.shard import _shard_modules
  from torchrec.distributed.sharding_plan import column_wise, construct_module_sharding_plan, placement, row_wise
  from torchrec.distributed.test_utils.infer_utils import assert_close, assert_weight_spec, create_cw_min_partition_constraints, create_test_model, KJTInputWrapper, model_input_to_forward_args, model_input_to_forward_args_kjt, prep_inputs, quantize, quantize_fpebc, shard_qebc, shard_qec, TestModelInfo, TestQuantEBCSharder
  from torchrec.distributed.test_utils.test_model import ModelInput
  from torchrec.distributed.types import ShardingEnv, ShardingPlan
  from torchrec.fx import symbolic_trace
  from torchrec.modules.embedding_modules import EmbeddingBagCollection
  from torchrec.modules.feature_processor_ import FeatureProcessorsCollection
  from torchrec.modules.fp_embedding_modules import FeatureProcessedEmbeddingBagCollection
label_desc: Use image node_id 6 for calling the InferShardingsTest obj's underlying member method code with example usage: obj.test_cw_sequence(weight_dtype) without return types