code: def plugins_cache(func):
      """Decorator that returns cached function results as long as no plugins
      have been modified since last time.
      """
  
      @wraps(func)
      def wrapper(*args, **kwargs):
          if not fo.config.plugins_cache_enabled:
              return func(*args, **kwargs)
  
          curr_dir_state = dir_state(fo.config.plugins_dir)
          if curr_dir_state != dir_cache["state"]:
              cache.clear()
              dir_cache["state"] = curr_dir_state
  
          key = hashkey(func, *args, **kwargs)
          if key not in cache:
              cache[key] = func(*args, **kwargs)
  
          return cache[key]
  
      return wrapper
  
file_path: fiftyone/fiftyone/operators/decorators.py
imports: import asyncio
  from cachetools.keys import hashkey
  from contextlib import contextmanager
  from functools import wraps
  import signal
  import os
  import fiftyone
  from fiftyone.plugins.core import _iter_plugin_metadata_files
label_desc: Use image node_id 4 for calling a global function with example usage: plugins_cache(func) and returns: wrapper, cache, func