code: def cur_memory():
      "Get the current memory use for this process"
      if resource:
          res = resource.getrusage(resource.RUSAGE_SELF)
          return "%.1f MiB" % (res.ru_idrss,)
      else:
          return "unknown"
  
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 6 for calling a global function with example usage: cur_memory() and returns: unknown, str