code: def get_embedding_names_by_table(
      tables: Union[List[EmbeddingBagConfig], List[EmbeddingConfig]],
  ) -> List[List[str]]:
      shared_feature: Dict[str, bool] = {}
      for embedding_config in tables:
          for feature_name in embedding_config.feature_names:
              if feature_name not in shared_feature:
                  shared_feature[feature_name] = False
              else:
                  shared_feature[feature_name] = True
      embedding_names_by_table: List[List[str]] = []
      for embedding_config in tables:
          embedding_names: List[str] = []
          for feature_name in embedding_config.feature_names:
              if shared_feature[feature_name]:
                  embedding_names.append(
                      feature_name + "@" + embedding_config.name
                  )
              else:
                  embedding_names.append(feature_name)
          embedding_names_by_table.append(embedding_names)
      return embedding_names_by_table
  
imports: import abc
  from typing import Dict, List, Optional, Tuple, Union
  import torch
  import torch.nn
  from torchrec.modules.embedding_configs import DataType, EmbeddingBagConfig, EmbeddingConfig, pooling_type_to_str
  from torchrec.sparse.jagged_tensor import JaggedTensor, KeyedJaggedTensor, KeyedTensor
label_desc: Use image node_id 3 for calling a global function with example usage: get_embedding_names_by_table(tables) and returns: embedding_names_by_table