code: def populate_fx_names(
      quant_ebc: Union[
          QuantEmbeddingBagCollection,
          ShardedQuantEmbeddingBagCollection,
      ]
  ) -> None:
      """
      Assigns fx path to non registered lookup modules. This allows the Torchrec tracer to fallback to
      emb_module._fx_path for table batched embeddings.
      """
      if isinstance(quant_ebc, QuantEmbeddingBagCollection):
          for emb_configs, emb_module in zip(
              quant_ebc._key_to_tables, quant_ebc._emb_modules
          ):
              table_names = []
              for config in emb_configs:
                  table_names.append(config.name)
              joined_table_names = ",".join(table_names)
              emb_module._fx_path = f"emb_module.{joined_table_names}"
      elif isinstance(quant_ebc, ShardedQuantEmbeddingBagCollection):
          for i, (emb_module, emb_dist_module) in enumerate(
              zip(quant_ebc._lookups, quant_ebc._output_dists)
          ):
              embedding_fx_path = f"embedding_lookup.sharding_{i}"
              emb_module._fx_path = embedding_fx_path
              emb_dist_module._fx_path = f"embedding_dist.{i}"
              for rank, rank_module in enumerate(
                  emb_module._embedding_lookups_per_rank
              ):
                  rank_fx_path = f"{embedding_fx_path}.rank_{rank}"
                  rank_module._fx_path = rank_fx_path
                  for group, group_module in enumerate(
                      rank_module._emb_modules
                  ):
                      group_module._fx_path = (
                          f"{rank_fx_path}.group_{group}"
                      )
                      group_module._emb_module._fx_path = (
                          f"{rank_fx_path}.group_{group}.tbe"
                      )
  
file_path: torchrec/torchrec/quant/utils.py
imports: from typing import Optional, Union
  import torch
  from torch import nn
  from torchrec.distributed.model_parallel import DistributedModelParallel
  from torchrec.distributed.quant_embeddingbag import ShardedQuantEmbeddingBagCollection
  from torchrec.quant.embedding_modules import EmbeddingBagCollection, EmbeddingCollection
label_desc: Use image node_id 1 for calling a global function with example usage: populate_fx_names(quant_ebc) without return types