code: def log_deprecated(name="", text="", eos=""):
      
      assert name or text
      if eos:
          eos = "after " + datetime(*map(int, eos.split("-"))).strftime("%d %b")
      if name:
          if eos:
              warn_msg = "%s will be deprecated %s. %s" % (name, eos, text)
          else:
              warn_msg = "%s was deprecated. %s" % (name, text)
      else:
          warn_msg = text
          if eos:
              warn_msg += " Legacy period ends %s" % eos
      logger.warn("[Deprecated] " + warn_msg)
docs: Log deprecation warning.
  
      Args:
          name (str): name of the deprecated item.
          text (str, optional): information about the deprecation.
          eos (str, optional): end of service date such as "YYYY-MM-DD".