code: def log_once(message, func="info"):
      """
      Log certain message only once. Call this function more than one times with
      the same message will result in no-op.
  
      Args:
          message(str): message to log
          func(str): the name of the logger method. e.g. "info", "warn", "error".
      """
      getattr(logger, func)(message)
  
file_path: tensorpack/tensorpack/utils/argtools.py
imports: import inspect
  import functools
  from .None import logger
label_desc: Use image node_id 7 for calling a global function with example usage: log_once(message, func) without return types