code: def __check_cache(f, X):
      global __cache0, __cache_X0, __cache_f0
      global __cache1, __cache_X1, __cache_f1
      if X is __cache_X0 and f is __cache_f0:
          return __cache0
      elif X is __cache_X1 and f is __cache_f1:
          return __cache1
      else:
          __cache_f1 = __cache_f0
          __cache_X1 = __cache_X0
          __cache1 = __cache0
          __cache_f0 = f
          __cache_X0 = X
          __cache0 = f(X)
          return __cache0
  
imports: import hashlib
  import os
  import time
  import numpy
  import sklearn
  from ..None import __version__
  from .None import measures, methods
label_desc: Use image node_id 40 for calling a global function with example usage: __check_cache(f, X) and returns: __cache0, __cache1, __cache0