code: def log_deprecated(name="", text="", eos="", max_num_warnings=None):
      """
      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".
          max_num_warnings (int, optional): the maximum number of times to print this warning
      """
      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
  
      if max_num_warnings is not None:
          if _DEPRECATED_LOG_NUM[warn_msg] >= max_num_warnings:
              return
          _DEPRECATED_LOG_NUM[warn_msg] += 1
      logger.warn("[Deprecated] " + warn_msg)
  
file_path: tensorpack/tensorpack/utils/develop.py
imports: import functools
  import importlib
  import os
  import types
  from collections import defaultdict
  from datetime import datetime
  import six
  from .None import logger
label_desc: Use image node_id 4 for calling a global function with example usage: log_deprecated(name, text, eos, max_num_warnings) without return types