code: def retrieve_from_cache(cache_dir, cache_key):
      class _InvalidInfoFile(RuntimeError):
          pass
  
      from os.path import join, isdir
  
      module_cache_dir = join(cache_dir, cache_key)
      if not isdir(module_cache_dir):
          return None
  
      cleanup_m = CleanupManager()
      try:
          try:
              CacheLockManager(cleanup_m, cache_dir)
  
              mod_cache_dir_m = ModuleCacheDirManager(
                  cleanup_m, module_cache_dir
              )
              info_path = mod_cache_dir_m.sub("info")
              binary_path = mod_cache_dir_m.sub("binary")
  
              # {{{ load info file
  
              try:
                  from pickle import load
  
                  try:
                      info_file = open(info_path, "rb")
                  except OSError:
                      raise _InvalidInfoFile()
  
                  try:
                      try:
                          info = load(info_file)
                      except EOFError:
                          raise _InvalidInfoFile()
                  finally:
                      info_file.close()
  
              except _InvalidInfoFile:
                  mod_cache_dir_m.reset()
                  from warnings import warn
  
                  warn(
                      "PyOpenCL encountered an invalid info file for "
                      f"cache key '{cache_key}'",
                      stacklevel=2,
                  )
                  return None
  
              # }}}
  
              # {{{ load binary
  
              binary_file = open(binary_path, "rb")
              try:
                  binary = binary_file.read()
              finally:
                  binary_file.close()
  
              # }}}
  
              if check_dependencies(info.dependencies):
                  return binary, info.log
              else:
                  mod_cache_dir_m.reset()
  
          except Exception:
              cleanup_m.error_clean_up()
              raise
      finally:
          cleanup_m.clean_up()
  
imports: import re
  import os
  import sys
  from dataclasses import dataclass
  from typing import List, Optional, Tuple
  import pyopencl._cl
  import logging
  import hashlib
label_desc: Use image node_id 8 for calling a global function with example usage: retrieve_from_cache(cache_dir, cache_key) and returns: None, binary,  info, None