code: def last_memo(func=None, check_type="identity"):
      if func is None:
          return lambda f: LastMemo(f, check_type)
      else:
          return LastMemo(func, check_type)
  
file_path: lkpy/lenskit/util/__init__.py
imports: import logging
  from textwrap import dedent
  from copy import deepcopy
  from ..algorithms import Algorithm
  from .log import log_to_notebook, log_to_stderr
  from .timing import Stopwatch
  from .random import derivable_rng
  from .parallel import proc_count
label_desc: Use image node_id 2 for calling a global function with example usage: last_memo(func, check_type) and returns: function, LastMemo