code: def _close(wrapped, *, cancel=False, return_exceptions=True):
      if wrapped.closed:
          raise RuntimeError("alru_cache is closed")
  
      wrapped.closed = True
  
      if cancel:
          for task in wrapped.tasks:
              if not task.done():  # not sure is it possible
                  task.cancel()
  
      return _wait_closed(wrapped, return_exceptions=return_exceptions)
  
file_path: mars/mars/lib/aio/lru.py
imports: import asyncio
  import os
  import weakref
  from collections import OrderedDict
  from functools import _CacheInfo, _make_key, partial, wraps
label_desc: Use image node_id 7 for calling a global function with example usage: _close(wrapped) and returns: _wait_closed