code: def deprecation_getattr(module, deprecations):
      def getattr(name):
          if name in deprecations:
              message, fn = deprecations[name]
              if fn is None:
                  raise AttributeError(message)
              warnings.warn(message, DeprecationWarning, stacklevel=2)
              return fn
          raise AttributeError(
              f"module {module!r} has no attribute {name!r}"
          )
  
      return getattr
  
label_desc: Use image node_id 1 for calling a global function with example usage: deprecation_getattr(module, deprecations) and returns: getattr, fn