code: def _should_warn(func_or_class, warn_once=True):
      """Check whether to warn or not with side effect."""
      if id(func_or_class) in _PRINTED_WARNING:
          return False
      if warn_once:
          _PRINTED_WARNING.add(id(func_or_class))
      return True
  
file_path: tfx/tfx/utils/deprecation_utils.py
imports: import functools
  import inspect
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: _should_warn(func_or_class, warn_once) and returns: True, False