code: def get_tables_and_input(
      table_sizes: List[Tuple[int, int]],
      num_inputs: int,
      batch_size: int,
      world_size: int,
  ) -> Tuple[List[EmbeddingBagConfig], List[KeyedJaggedTensor]]:
      tables: List[EmbeddingBagConfig] = [
          EmbeddingBagConfig(
              num_embeddings=num_embeddings,
              embedding_dim=embedding_dim,
              name="table_" + str(i),
              feature_names=["feature_" + str(i)],
              data_type=DataType.INT8,
          )
          for i, (num_embeddings, embedding_dim) in enumerate(
              table_sizes
          )
      ]
  
      inputs: List[KeyedJaggedTensor] = []
      for _ in range(num_inputs):
          model_input = ModelInput.generate(
              batch_size=batch_size,
              world_size=world_size,
              num_float_features=0,
              tables=tables,
              weighted_tables=[],
              long_indices=False,
          )[1][0]
          inputs.append(
              model_input.idlist_features.to(torch.device("cuda:0"))
          )
  
      return tables, inputs
  
imports: import argparse
  import gc
  import logging
  import os
  import time
  from dataclasses import dataclass
  from enum import Enum
  from typing import Dict, List, Tuple
  import torch
  from torch.autograd.profiler import record_function
  from torchrec.distributed.embedding_types import EmbeddingComputeKernel, ShardingType
  from torchrec.distributed.planner import EmbeddingShardingPlanner, Topology
  from torchrec.distributed.planner.enumerators import EmbeddingEnumerator
  from torchrec.distributed.planner.shard_estimators import EmbeddingPerfEstimator, EmbeddingStorageEstimator
  from torchrec.distributed.shard import _shard_modules
  from torchrec.distributed.test_utils.infer_utils import TestQuantEBCSharder
  from torchrec.distributed.test_utils.test_model import ModelInput
  from torchrec.distributed.types import DataType, ShardingEnv
  from torchrec.fx import symbolic_trace
  from torchrec.modules.embedding_configs import EmbeddingBagConfig
  from torchrec.quant.embedding_modules import EmbeddingBagCollection
  from torchrec.sparse.jagged_tensor import KeyedJaggedTensor, KeyedTensor
label_desc: Use image node_id 7 for calling a global function with example usage: get_tables_and_input(table_sizes, num_inputs, batch_size, world_size) and returns: tables,  inputs