code: def register_promote_function(module, name):
      if not hasattr(module, name):
          raise ValueError(
              "No function named {} in module {}.".format(name, module)
          )
      _USER_PROMOTE_REGISTRY.add((module, name))
  
file_path: apex/apex/amp/amp.py
imports: import functools
  import itertools
  import torch
  from .None import compat, rnn_compat, utils, wrap
  from .handle import AmpHandle, NoOpHandle
  from .lists import functional_overrides, torch_overrides, tensor_overrides
  from ._amp_state import _amp_state
  from .frontend import *
label_desc: Use image node_id 7 for calling a global function with example usage: register_promote_function(module, name) without return types