code: def test_save_load_state_dict(
      self,
      data_type: DataType,
      quant_type: torch.dtype,
      output_type: torch.dtype,
  ) -> None:
      eb1_config = EmbeddingBagConfig(
          name="t1",
          embedding_dim=16,
          num_embeddings=10,
          feature_names=["f1"],
          data_type=data_type,
      )
      eb2_config = EmbeddingBagConfig(
          name="t2",
          embedding_dim=16,
          num_embeddings=10,
          feature_names=["f1"],
          data_type=data_type,
      )
      tables = [eb1_config, eb2_config]
  
      ebc = EmbeddingBagCollection(tables=tables)
  
      # test forward
      ebc.qconfig = torch.quantization.QConfig(
          activation=torch.quantization.PlaceholderObserver.with_args(
              dtype=output_type
          ),
          weight=torch.quantization.PlaceholderObserver.with_args(
              dtype=quant_type
          ),
      )
  
      qebc = QuantEmbeddingBagCollection.from_float(ebc)
      qebc_state_dict = qebc.state_dict()
  
      ebc_2 = EmbeddingBagCollection(tables=tables)
      ebc_2.qconfig = torch.quantization.QConfig(
          activation=torch.quantization.PlaceholderObserver.with_args(
              dtype=output_type
          ),
          weight=torch.quantization.PlaceholderObserver.with_args(
              dtype=quant_type
          ),
      )
  
      qebc_2 = QuantEmbeddingBagCollection.from_float(ebc_2)
  
      qebc_2.load_state_dict(qebc_state_dict)
      qebc_2_state_dict = qebc_2.state_dict()
  
      for key in qebc_state_dict:
          torch.testing.assert_close(
              qebc_state_dict[key], qebc_2_state_dict[key]
          )
  
      features = KeyedJaggedTensor(
          keys=["f1", "f2"],
          values=torch.as_tensor([0, 1]),
          lengths=torch.as_tensor([1, 1]),
      )
  
      embeddings = qebc(features)
      embeddings_2 = qebc_2(features)
      self._asserting_same_embeddings(embeddings, embeddings_2)
  
imports: import unittest
  from typing import Dict, List, Optional, Type
  import hypothesis.strategies
  import torch
  from hypothesis import given, settings, Verbosity
  from torchrec import inference
  from torchrec.modules.embedding_configs import DataType, EmbeddingBagConfig, EmbeddingConfig, QuantConfig
  from torchrec.modules.embedding_modules import EmbeddingBagCollection, EmbeddingCollection
  from torchrec.quant.embedding_modules import EmbeddingBagCollection, EmbeddingCollection, quant_prep_enable_quant_state_dict_split_scale_bias
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor, KeyedTensor
label_desc: Use image node_id 8 for calling the EmbeddingBagCollectionTest obj's underlying member method code with example usage: obj.test_save_load_state_dict(data_type, quant_type, output_type) without return types