code: def deprecated_alias(end_support_version, **aliases):
      def deco(f):
          @functools.wraps(f)
          def wrapper(*args, **kwargs):
              try:
                  func_name = "{}.{}".format(
                      args[0].__class__.__name__, f.__name__
                  )
              except (NameError, IndexError):
                  func_name = f.__name__
  
              rename_kwargs(
                  kwargs, aliases, end_support_version, func_name
              )
  
              return f(*args, **kwargs)
  
          return wrapper
  
      return deco
  
imports: import functools
  import warnings
  from tensorlayer import logging
label_desc: Use image node_id 1 for calling a global function with example usage: deprecated_alias(end_support_version) and returns: deco, wrapper, f