code: def register_model_deprecations(
      module_name: str, deprecation_map: Dict[str, Optional[str]]
  ):
      mod = sys.modules[module_name]
      module_name_split = module_name.split(".")
      module_name = (
          module_name_split[-1] if len(module_name_split) else ""
      )
  
      for deprecated, current in deprecation_map.items():
          if hasattr(mod, "__all__"):
              mod.__all__.append(deprecated)
          current_fn = None
          current_tag = ""
          if current:
              current_name, current_tag = split_model_name_tag(current)
              current_fn = getattr(mod, current_name)
          deprecated_entrypoint_fn = _deprecated_model_shim(
              deprecated, current_fn, current_tag
          )
          setattr(mod, deprecated, deprecated_entrypoint_fn)
          _model_entrypoints[deprecated] = deprecated_entrypoint_fn
          _model_to_module[deprecated] = module_name
          _module_to_models[module_name].add(deprecated)
          _deprecated_models[deprecated] = current
          _module_to_deprecated_models[module_name][
              deprecated
          ] = current
  
imports: import fnmatch
  import re
  import sys
  import warnings
  from collections import defaultdict, deque
  from copy import deepcopy
  from dataclasses import replace
  from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Sequence, Union, Tuple
  from ._pretrained import PretrainedCfg, DefaultCfg
label_desc: Use image node_id 6 for calling a global function with example usage: register_model_deprecations(module_name, deprecation_map) without return types