code: def get_random_dataset(
      batch_size: int,
      num_batches: int,
      num_dense_features: int,
      embedding_bag_configs: List[EmbeddingBagConfig],
      pooling_factors: Optional[Dict[str, int]] = None,
  ) -> IterableDataset[Batch]:
      if pooling_factors is None:
          pooling_factors = {}
  
      keys = []
      ids_per_features = []
      hash_sizes = []
  
      for table in embedding_bag_configs:
          for feature_name in table.feature_names:
              keys.append(feature_name)
              # guess a pooling factor here
              ids_per_features.append(
                  pooling_factors.get(feature_name, 64)
              )
              hash_sizes.append(table.num_embeddings)
  
      return RandomRecDataset(
          keys=keys,
          batch_size=batch_size,
          hash_sizes=hash_sizes,
          ids_per_features=ids_per_features,
          num_dense=num_dense_features,
          num_batches=num_batches,
      )
  
file_path: torchrec/benchmarks/ebc_benchmarks_utils.py
imports: import time
  from typing import Dict, List, Optional, Tuple
  import numpy
  import torch
  from torch.utils.data.dataset import IterableDataset
  from torchrec.datasets.random import RandomRecDataset
  from torchrec.datasets.utils import Batch
  from torchrec.modules.embedding_configs import EmbeddingBagConfig
label_desc: Use image node_id 1 for calling a global function with example usage: get_random_dataset(batch_size, num_batches, num_dense_features, embedding_bag_configs, pooling_factors) and returns: RandomRecDataset