code: def replace_usage_of_field_references(
      obj: Union[
          ml_collections.ConfigDict,
          Mapping[str, Any],
          Iterable[Any],
          ml_collections.FieldReference,
      ],
      field_reference_replace_map: MutableMapping[
          int, ml_collections.FieldReference
      ],
  ) -> None:
      """Replaces the usages of the field references."""
      if isinstance(obj, ml_collections.FieldReference):
          for i, op in enumerate(
              obj._ops
          ):  # pylint: disable=protected-access
              fn = replace_in_func(op.fn, field_reference_replace_map)
              new_args = replace_in_config(
                  op.args, field_reference_replace_map
              )
              obj._ops[i] = ml_collections.config_dict._Op(
                  fn, new_args
              )  # pylint: disable=protected-access
      else:
          if isinstance(obj, (ml_collections.ConfigDict, Mapping)):
              fields = (
                  obj._fields
                  if isinstance(  # pylint: disable=protected-access
                      obj, ml_collections.ConfigDict
                  )
                  else obj
              )
              it = fields.values()
          else:
              it = obj
  
          for v in it:
              if isinstance(v, ml_collections.FieldReference):
                  replace_usage_of_field_references(
                      v, field_reference_replace_map
                  )
              elif isinstance(
                  v, (ml_collections.ConfigDict, Iterable)
              ) and not isinstance(obj, (str, bytes)):
                  replace_usage_of_field_references(
                      v, field_reference_replace_map
                  )
  
imports: from collections.abc import Callable
  from collections.abc import Iterable
  from collections.abc import Iterator
  from collections.abc import Mapping
  from collections.abc import MutableMapping
  from collections.abc import Sequence
  import copy
  import types
  from typing import Any
  from typing import Optional
  from typing import TypeVar
  from typing import Union
  from dmvr import tokenizers
  import jax
  import ml_collections
label_desc: Use image node_id 6 for calling a global function with example usage: replace_usage_of_field_references(obj, field_reference_replace_map) without return types