code: def warning_once(logger_obj, *args, **kwargs):
      """
      This function is similar 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_obj.warning(*args, **kwargs)
  
imports: import functools
  import itertools
  import logging
  import os
  import re
  from dataclasses import dataclass, field
  from importlib import __import__
  from typing import Dict, List, Optional, Set, Union
  from weakref import WeakSet
  import torch._guards
  import torch.distributed
label_desc: Use image node_id 24 for calling a global function with example usage: warning_once(logger_obj) without return types