code: def convert_to_fbgemm_types(
      fused_params: Dict[str, Any]
  ) -> Dict[str, Any]:
      if "cache_precision" in fused_params:
          if isinstance(fused_params["cache_precision"], DataType):
              fused_params[
                  "cache_precision"
              ] = data_type_to_sparse_type(
                  fused_params["cache_precision"]
              )
  
      if "weights_precision" in fused_params:
          if isinstance(fused_params["weights_precision"], DataType):
              fused_params[
                  "weights_precision"
              ] = data_type_to_sparse_type(
                  fused_params["weights_precision"]
              )
  
      if "output_dtype" in fused_params:
          if isinstance(fused_params["output_dtype"], DataType):
              fused_params["output_dtype"] = data_type_to_sparse_type(
                  fused_params["output_dtype"]
              )
  
      return fused_params
  
imports: import copy
  import logging
  from collections import OrderedDict
  from itertools import accumulate
  from typing import Any, Dict, List, Optional, Set, Type, TypeVar, Union
  import torch
  from fbgemm_gpu.split_embedding_configs import EmbOptimType
  from torch import nn
  from torchrec import optim
  from torchrec.distributed.embedding_types import EmbeddingComputeKernel
  from torchrec.distributed.types import DataType, ParameterSharding, ShardedModule, ShardingType
  from torchrec.modules.embedding_configs import data_type_to_sparse_type
  from torchrec.types import CopyMixIn
label_desc: Use image node_id 11 for calling a global function with example usage: convert_to_fbgemm_types(fused_params) and returns: fused_params