code: def test_shared_tables(self) -> None:
      eb_config = EmbeddingBagConfig(
          name="t1",
          embedding_dim=3,
          num_embeddings=10,
          feature_names=["f1", "f2"],
      )
      ebc = EmbeddingBagCollection(tables=[eb_config])
  
      #     0       1        2  <-- batch
      # 0   [0,1] None    [2]
      # 1   [3]    [4]    [5,6,7]
      # ^
      # feature
      features = KeyedJaggedTensor.from_offsets_sync(
          keys=["f1", "f2"],
          values=torch.tensor([0, 1, 2, 3, 4, 5, 6, 7]),
          offsets=torch.tensor([0, 2, 2, 3, 4, 5, 8]),
      )
  
      pooled_embeddings = ebc(features)
      self.assertEqual(pooled_embeddings.values().size(), (3, 6))
      self.assertEqual(pooled_embeddings.keys(), ["f1", "f2"])
      self.assertEqual(pooled_embeddings.offset_per_key(), [0, 3, 6])
  
imports: import unittest
  from functools import partial
  import torch
  import torch.fx
  from torchrec.fx import symbolic_trace
  from torchrec.modules.embedding_configs import EmbeddingBagConfig, EmbeddingConfig
  from torchrec.modules.embedding_modules import EmbeddingBagCollection, EmbeddingCollection
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor
label_desc: Use image node_id 2 for calling the EmbeddingBagCollectionTest obj's underlying member method code with example usage: obj.test_shared_tables() without return types