class_docstr: A compiler that caches code compiled from interactive statements.
      
class_docstr_tok: ["A","compiler","that","caches","code","compiled","from","interactive","statements","."]
docstr: Make a name for a block of code, and cache the code.
  
  Parameters
  ----------
  transformed_code : str
      The executable Python source code to cache and compile.
  number : int
      A number which forms part of the code's name. Used for the execution
      counter.
  raw_code : str
      The raw code before transformation, if None, set to `transformed_code`.
  
  Returns
  -------
  The name of the cached code (as a string). Pass this as the filename
  argument to compilation, so that tracebacks are correctly hooked up.
docstr_tok: ["Make","a","name","for","a","block","of","code",",","and","cache","the","code",".","Parameters","--","--","--","--","--","transformed_code",":","str","The","executable","Python","source","code","to","cache","and","compile",".","number",":","int","A","number","which","forms","part","of","the","code","'s","name",".","Used","for","the","execution","counter",".","raw_code",":","str","The","raw","code","before","transformation",",","if","None",",","set","to","`","transformed_code","`",".","Returns","--","--","--","-","The","name","of","the","cached","code","(","as","a","string",")",".","Pass","this","as","the","filename","argument","to","compilation",",","so","that","tracebacks","are","correctly","hooked","up","."]
code: def cache(self, transformed_code, number=0, raw_code=None):
      """Make a name for a block of code, and cache the code.
  
      Parameters
      ----------
      transformed_code : str
          The executable Python source code to cache and compile.
      number : int
          A number which forms part of the code's name. Used for the execution
          counter.
      raw_code : str
          The raw code before transformation, if None, set to `transformed_code`.
  
      Returns
      -------
      The name of the cached code (as a string). Pass this as the filename
      argument to compilation, so that tracebacks are correctly hooked up.
      """
      if raw_code is None:
          raw_code = transformed_code
  
      name = self.get_code_name(raw_code, transformed_code, number)
  
      # Save the execution count
      self._filename_map[name] = number
  
      # Since Python 2.5, setting mtime to `None` means the lines will
      # never be removed by `linecache.checkcache`.  This means all the
      # monkeypatching has *never* been necessary, since this code was
      # only added in 2010, at which point IPython had already stopped
      # supporting Python 2.4.
      #
      # Note that `linecache.clearcache` and `linecache.updatecache` may
      # still remove our code from the cache, but those show explicit
      # intent, and we should not try to interfere.  Normally the former
      # is never called except when out of memory, and the latter is only
      # called for lines *not* in the cache.
      entry = (
          len(transformed_code),
          None,
          [line + "\n" for line in transformed_code.splitlines()],
          name,
      )
      linecache.cache[name] = entry
      return name
  
imports: import __future__
  from ast import PyCF_ONLY_AST
  import codeop
  import functools
  import hashlib
  import linecache
  import operator
  import time
  from contextlib import contextmanager
label_desc: Use image node_id 7 for calling the CachingCompiler obj's underlying member method code with example usage: obj.cache(transformed_code, number, raw_code) and returns: name