code: def _quantize(
      module: nn.Module, quant_state_dict_split_scale_bias: bool = False
  ) -> nn.Module:
      if quant_state_dict_split_scale_bias:
          quant_prep_enable_quant_state_dict_split_scale_bias_for_types(
              module, [EmbeddingCollection]
          )
      qconfig = quant.QConfig(
          activation=quant.PlaceholderObserver,
          weight=quant.PlaceholderObserver.with_args(dtype=torch.qint8),
      )
      return quant.quantize_dynamic(
          module,
          qconfig_spec={
              EmbeddingCollection: qconfig,
          },
          mapping={
              EmbeddingCollection: QuantEmbeddingCollection,
          },
          inplace=True,
      )
  
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 1 for calling a global function with example usage: _quantize(module, quant_state_dict_split_scale_bias) and returns: quant