code: def rename_kwargs(kwargs, aliases, end_support_version, func_name):
      for alias, new in aliases.items():
          if alias in kwargs:
              if new in kwargs:
                  raise TypeError(
                      "{}() received both {} and {}".format(
                          func_name, alias, new
                      )
                  )
  
              warnings.warn(
                  "{}() - {} is deprecated; use {}".format(
                      func_name, alias, new
                  ),
                  DeprecationWarning,
              )
              logging.warning(
                  "DeprecationWarning: {}(): "
                  "`{}` argument is deprecated and will be removed in version {}, "
                  "please change for `{}.`".format(
                      func_name, alias, end_support_version, new
                  )
              )
              kwargs[new] = kwargs.pop(alias)
  
imports: import functools
  import warnings
  from tensorlayer import logging
label_desc: Use image node_id 2 for calling a global function with example usage: rename_kwargs(kwargs, aliases, end_support_version, func_name) without return types