code: def test_quant_pred_shard(
      self,
      output_type: torch.dtype,
      quant_state_dict_split_scale_bias: bool,
  ) -> None:
      device = torch.device("cuda:0")
  
      # wrap in sequential because _quantize only applies to submodules...
      model = nn.Sequential(
          EmbeddingCollection(tables=self.tables, device=device)
      )
  
      quant_model = _quantize(model)
  
      sharded_quant_model = _shard_modules(
          module=quant_model,
          sharders=[
              cast(
                  ModuleSharder[torch.nn.Module],
                  TestQuantECSharder(
                      sharding_type=ShardingType.TABLE_WISE.value,
                      kernel_type=EmbeddingComputeKernel.QUANT.value,
                  ),
              )
          ],
          device=device,
          env=ShardingEnv.from_local(world_size=2, rank=0),
      )
  
      sharded_quant_model.load_state_dict(
          sharded_quant_model.state_dict()
      )
  
      local_batch, _ = ModelInput.generate(
          batch_size=16,
          world_size=1,
          num_float_features=10,
          tables=self.tables,
          weighted_tables=[],
          long_indices=False,
      )
      local_batch = local_batch.to(device)
      sharded_quant_model(local_batch.idlist_features)
  
imports: import unittest
  from typing import cast, List, Optional, Type
  import hypothesis.strategies
  import torch
  from hypothesis import given, settings, Verbosity
  from torch import nn, quantization
  from torchrec.distributed.embedding_types import EmbeddingComputeKernel
  from torchrec.distributed.quant_embedding import QuantEmbeddingCollectionSharder
  from torchrec.distributed.shard import _shard_modules
  from torchrec.distributed.test_utils.test_model import ModelInput, TestSparseNNBase
  from torchrec.distributed.test_utils.test_model_parallel_base import InferenceModelParallelTestBase
  from torchrec.distributed.tests.test_sequence_model import TestSequenceSparseNN
  from torchrec.distributed.types import ModuleSharder, ShardingEnv, ShardingType
  from torchrec.modules.embedding_configs import EmbeddingConfig
  from torchrec.modules.embedding_modules import EmbeddingCollection
  from torchrec.quant.embedding_modules import EmbeddingCollection, quant_prep_enable_quant_state_dict_split_scale_bias_for_types
  from torchrec.test_utils import seed_and_log, skip_if_asan_class
label_desc: Use image node_id 4 for calling the QuantSequenceModelParallelTest obj's underlying member method code with example usage: obj.test_quant_pred_shard(output_type, quant_state_dict_split_scale_bias) without return types