code: def cached(method):
      """
      Decorates an Interface method and using a cached version
      """
  
      def cached(*args, **kwargs):
          cache = args[1]._cached
          if cache is None:
              return method(*args, **kwargs)
          else:
              args = (cache,) + args[2:]
              return getattr(cache.interface, method.__name__)(
                  *args, **kwargs
              )
  
      return cached
  
imports: import numpy
  from ..None import util
label_desc: Use image node_id 5 for calling a global function with example usage: cached(method) and returns: cached, method, getattr