code: def test_qebc_pruned_tw_one_ebc(self) -> None:
      batch_size: int = 1
      world_size: int = 2
      local_device = torch.device("cuda:0")
      num_embedding = 200
      emb_dim = 10
      sharding_type = ShardingType.TABLE_WISE
  
      quant_model, sharded_model = create_quant_and_sharded_ebc_models(
          num_embedding=num_embedding,
          emb_dim=emb_dim,
          world_size=world_size,
          batch_size=batch_size,
          sharding_type=sharding_type,
          device=local_device,
      )
  
      kjt = KeyedJaggedTensor.from_lengths_sync(
          keys=["feature_0"],
          values=torch.tensor([0, 1, 2], dtype=torch.int32).cuda(),
          lengths=torch.tensor([1, 1, 1], dtype=torch.int32).cuda(),
          weights=None,
      )
  
      q_output = quant_model(kjt)
      s_output = sharded_model(kjt)
  
      assert_close(q_output["feature_0"], s_output["feature_0"])
  
      assert_close(
          q_output["feature_0"][0], torch.tensor([0.0] * emb_dim)
      )
      assert_close(
          q_output["feature_0"][2], torch.tensor([0.0] * emb_dim)
      )
  
file_path: torchrec/torchrec/distributed/tests/test_quant_pruning.py
imports: import io
  import unittest
  from typing import Dict, List, Tuple
  import torch
  from torchrec.distributed.embedding_types import ShardingType
  from torchrec.distributed.quant_state import sharded_tbes_weights_spec, WeightSpec
  from torchrec.distributed.test_utils.infer_utils import assert_close, assert_weight_spec, create_test_model, create_test_model_ebc_only_no_quantize, model_input_to_forward_args, prep_inputs, quantize, shard_qebc
  from torchrec.fx import symbolic_trace
  from torchrec.quant.embedding_modules import MODULE_ATTR_EMB_CONFIG_NAME_TO_PRUNING_INDICES_REMAPPING_DICT
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor
label_desc: Use image node_id 2 for calling the QuantPruneTest obj's underlying member method code with example usage: obj.test_qebc_pruned_tw_one_ebc() without return types