code: def time_cache(seconds):
      def decorator(func):
          cache = {}
  
          @wraps(func)
          def wrapper(*args, **kwargs):
              key = (args, frozenset(kwargs.items()))
              try:
                  created, result = cache[key]
                  if time.time() < created + seconds:
                      return result
              except KeyError:
                  pass
              result = func(*args, **kwargs)
              cache[key] = time.time(), result
              return result
  
          wrapper.clear_cache = lambda: cache.clear()
          return wrapper
  
      return decorator
  
file_path: catboost/contrib/python/jedi/py2/jedi/cache.py
imports: import time
  from functools import wraps
  from jedi import settings
  from parso.cache import parser_cache
label_desc: Use image node_id 4 for calling a global function with example usage: time_cache(seconds) and returns: decorator, wrapper, result, result