code: def warning_once(*args, **kwargs):
      """
      This method is identical to `logger.warning()`, but will emit the warning with the same message only once
  
      Note: The cache is for the function arguments, so 2 different callers using the same arguments will hit the cache.
      The assumption here is that all warning messages are unique across the code. If they aren't then need to switch to
      another type of cache that includes the caller frame information in the hashing function.
      """
      logger.warning(*args, **kwargs)
  
file_path: DeepSpeed/deepspeed/utils/logging.py
imports: import functools
  import logging
  import sys
  import os
label_desc: Use image node_id 1 for calling a global function with example usage: warning_once() without return types