code: def deprecated_alias(
      old_name,
      new_name,
      remove_version=None,
      msg=None,
      warning=FutureWarning,
  ):
      """
      Deprecate attribute in favor of alternative name.
  
      Parameters
      ----------
      old_name : str
          Old, deprecated name
      new_name : str
          New name
      remove_version : str, optional
          Version that the alias will be removed
      msg : str, optional
          Message to show.  Default is
          `old_name` is a deprecated alias for `new_name`
      warning : Warning, optional
          Warning class to give.  Default is FutureWarning.
  
      Notes
      -----
      Older or less-used classes may not conform to statsmodels naming
      conventions.  `deprecated_alias` lets us bring them into conformance
      without breaking backward-compatibility.
  
      Example
      -------
      Instances of the `Foo` class have a `nvars` attribute, but it _should_
      be called `neqs`:
  
      class Foo:
          nvars = deprecated_alias('nvars', 'neqs')
          def __init__(self, neqs):
              self.neqs = neqs
  
      >>> foo = Foo(3)
      >>> foo.nvars
      __main__:1: FutureWarning: nvars is a deprecated alias for neqs
      3
      """
  
      if msg is None:
          msg = "{} is a deprecated alias for {}".format(
              old_name, new_name
          )
          if remove_version is not None:
              msg += ", will be removed in version %s" % remove_version
  
      def fget(self):
          warnings.warn(msg, warning, stacklevel=2)
          return getattr(self, new_name)
  
      def fset(self, value):
          warnings.warn(msg, warning, stacklevel=2)
          setattr(self, new_name, value)
  
      res = property(fget=fget, fset=fset)
      return res
  
imports: from statsmodels.tools.sm_exceptions import CacheWriteWarning
  from statsmodels.compat.pandas import cache_readonly
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: deprecated_alias(old_name, new_name, remove_version, msg, warning) and returns: res, getattr