code: def cacheable(fn: "T") -> "T":
      from hypothesis.strategies._internal.strategies import (
          SearchStrategy,
      )
  
      @proxies(fn)
      def cached_strategy(*args, **kwargs):
          try:
              kwargs_cache_key = {
                  (k, convert_value(v)) for k, v in kwargs.items()
              }
          except TypeError:
              return fn(*args, **kwargs)
          cache_key = (
              fn,
              tuple(map(convert_value, args)),
              frozenset(kwargs_cache_key),
          )
          cache = get_cache()
          try:
              if cache_key in cache:
                  return cache[cache_key]
          except TypeError:
              return fn(*args, **kwargs)
          else:
              result = fn(*args, **kwargs)
              if (
                  not isinstance(result, SearchStrategy)
                  or result.is_cacheable
              ):
                  cache[cache_key] = result
              return result
  
      cached_strategy.__clear_cache = clear_cache  # type: ignore
      return cached_strategy
  
imports: import sys
  import threading
  from inspect import signature
  from typing import TYPE_CHECKING, Callable, Dict
  import attr
  from hypothesis.internal.cache import LRUReusedCache
  from hypothesis.internal.compat import dataclass_asdict
  from hypothesis.internal.floats import float_to_int
  from hypothesis.internal.reflection import proxies
  from hypothesis.vendor.pretty import pretty
label_desc: Use image node_id 4 for calling a global function with example usage: cacheable(fn) and returns: cached_strategy, result, fn, cache, fn