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
  ----------
  code : str
    The Python source code to cache.
  number : int
    A number which forms part of the code's name. Used for the execution
    counter.
    
  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","--","--","--","--","--","code",":","str","The","Python","source","code","to","cache",".","number",":","int","A","number","which","forms","part","of","the","code","'s","name",".","Used","for","the","execution","counter",".","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, code, number=0):
      """Make a name for a block of code, and cache the code.
  
      Parameters
      ----------
      code : str
        The Python source code to cache.
      number : int
        A number which forms part of the code's name. Used for the execution
        counter.
  
      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.
      """
      name = code_name(code, number)
      entry = (
          len(code),
          time.time(),
          [line + "\n" for line in code.splitlines()],
          name,
      )
      linecache.cache[name] = entry
      linecache._ipython_cache[name] = entry
      return name
  
file_path: catboost/contrib/python/ipython/py2/IPython/core/compilerop.py
imports: from __future__ import print_function
  import __future__
  from ast import PyCF_ONLY_AST
  import codeop
  import functools
  import hashlib
  import linecache
  import operator
  import time
label_desc: Use image node_id 5 for calling the CachingCompiler obj's underlying member method code with example usage: obj.cache(code, number) and returns: name