code: def _generate_deprecation_message(
      since,
      message="",
      name="",
      alternative="",
      pending=False,
      obj_type="attribute",
      addendum="",
  ):
      if not message:
          if pending:
              message = (
                  "The %(name)s %(obj_type)s will be deprecated in a "
                  "future version."
              )
          else:
              message = (
                  "The %(name)s %(obj_type)s was deprecated in version "
                  "%(since)s."
              )
  
      altmessage = ""
      if alternative:
          altmessage = " Use %s instead." % alternative
  
      message = (
          message
          % {
              "func": name,
              "name": name,
              "alternative": alternative,
              "obj_type": obj_type,
              "since": since,
          }
      ) + altmessage
  
      if addendum:
          message += addendum
  
      return message
  
file_path: catboost/contrib/python/matplotlib/py2/matplotlib/cbook/deprecation.py
imports: import functools
  import textwrap
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: _generate_deprecation_message(since, message, name, alternative, pending, obj_type, addendum) and returns: message