class_docstr: EmbeddingFusedOptimizer exposes the internal SplitTableBatchedEmbeddingBagsCodeGen optimizer state.
  It can be used like a normal optimizer to perform functionalities such as loading/saving optimizers
  and updating learning rates.
  
  Args:
      tables (List[BaseEmbeddingConfig]): list of embedding tables.
      emb_module (SplitTableBatchedEmbeddingBagsCodeGen): Fbgemm module whose optimizer state we want to expose
  Example:
      See usage in _BatchedFusedEmbeddingLookups
code: def __init__(  # noqa C901
      self,
      tables: List[BaseEmbeddingConfig],
      emb_module: SplitTableBatchedEmbeddingBagsCodegen,
  ) -> None:
      self._emb_module: SplitTableBatchedEmbeddingBagsCodegen = (
          emb_module
      )
  
      # pyre-ignore [33]
      state: Dict[Any, Any] = {}
      param_group: Dict[str, Any] = {
          "params": [],
          "lr": emb_module.optimizer_args.learning_rate,
      }
  
      params: Dict[str, torch.Tensor] = {}
  
      # Fused optimizers use buffers (they don't use autograd) and we want to make sure
      # that state_dict look identical to no-fused version.
      split_embedding_weights = emb_module.split_embedding_weights()
      split_optimizer_states = emb_module.split_optimizer_states()
  
      for embedding_weight, optimizer_states, table in zip(
          split_embedding_weights, split_optimizer_states, tables
      ):
          weight = embedding_weight
  
          state[weight] = {}
          param_group["params"].append(weight)
          param_key = table.name + ".weight"
          params[param_key] = weight
  
          if len(optimizer_states) >= 1:
              state[weight][
                  f"{param_key}.momentum_1"
              ] = optimizer_states[0]
          if len(optimizer_states) >= 2:
              state[weight][
                  f"{param_key}.momentum_2"
              ] = optimizer_states[1]
  
      super().__init__(params, state, [param_group])
  
imports: import copy
  import itertools
  from collections import defaultdict
  from typing import Any, cast, Dict, Iterator, List, Optional, Set, Tuple, Type
  import torch
  import torch.nn
  import torchrec.optim
  from fbgemm_gpu.split_embedding_configs import EmbOptimType
  from fbgemm_gpu.split_table_batched_embeddings_ops_training import ComputeDevice, EmbeddingLocation, SplitTableBatchedEmbeddingBagsCodegen
  from torchrec.modules.embedding_configs import BaseEmbeddingConfig, DataType, EmbeddingBagConfig, EmbeddingConfig, pooling_type_to_pooling_mode, PoolingType
  from torchrec.modules.embedding_modules import EmbeddingBagCollection, EmbeddingBagCollectionInterface, EmbeddingCollection, EmbeddingCollectionInterface, get_embedding_names_by_table
  from torchrec.optim.fused import FusedOptimizer, FusedOptimizerModule
  from torchrec.optim.keyed import CombinedOptimizer, KeyedOptimizer
  from torchrec.sparse.jagged_tensor import JaggedTensor, KeyedJaggedTensor, KeyedTensor
label_desc: Use image node_id 1 to create a new EmbeddingFusedOptimizer object from inherited base classes: FusedOptimizer with example: obj = EmbeddingFusedOptimizer(tables, emb_module)