code: def test_shared_tables(
      self,
      device: torch.device,
  ) -> None:
      ebc_config = EmbeddingBagConfig(
          name="t1",
          embedding_dim=4,
          num_embeddings=10,
          feature_names=["f1", "f2"],
      )
      ebc = FusedEmbeddingBagCollection(
          tables=[ebc_config],
          optimizer_type=torch.optim.SGD,
          optimizer_kwargs={"lr": 0.02},
          device=device,
      )
  
      #     0       1        2  <-- batch
      # f1   [0,1] None    [2]
      # f2   [3]    [4]    [5,6,7]
      # ^
      # feature
      features = KeyedJaggedTensor.from_lengths_sync(
          keys=["f1", "f2"],
          values=torch.tensor([0, 1, 2, 3, 4, 5, 6, 7]),
          lengths=torch.tensor([2, 0, 1, 1, 1, 3]),
      ).to(device)
  
      pooled_embeddings = ebc(features)
  
      self.assertEqual(pooled_embeddings.keys(), ["f1", "f2"])
      self.assertEqual(
          pooled_embeddings["f1"].shape, (features.stride(), 4)
      )
      self.assertEqual(
          pooled_embeddings["f2"].shape, (features.stride(), 4)
      )
  
      torch.testing.assert_close(
          pooled_embeddings["f1"][1], torch.zeros(4).to(device)
      )
  
imports: import unittest
  from collections import OrderedDict
  from typing import Any, Dict, List, Optional, Tuple, Type
  import hypothesis.strategies
  import torch
  import torch.fx
  import torchrec
  from fbgemm_gpu.split_table_batched_embeddings_ops_training import EmbeddingLocation
  from hypothesis import given, settings
  from torchrec.modules.embedding_configs import EmbeddingBagConfig, EmbeddingConfig
  from torchrec.modules.embedding_modules import EmbeddingBagCollection, EmbeddingCollection
  from torchrec.modules.fused_embedding_modules import fuse_embedding_optimizer, FusedEmbeddingBagCollection, FusedEmbeddingCollection
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor
label_desc: Use image node_id 4 for calling the FusedEmbeddingBagCollectionTest obj's underlying member method code with example usage: obj.test_shared_tables(device) without return types