class_docstr: an immutable object holding a source code fragment,
  possibly deindenting it.
class_docstr_tok: ["an","immutable","object","holding","a","source","code","fragment",",","possibly","deindenting","it","."]
docstr: return compiled code object. if filename is None
  invent an artificial filename which displays
  the source/line position of the caller frame.
docstr_tok: ["return","compiled","code","object",".","if","filename","is","None","invent","an","artificial","filename","which","displays","the","source\/line","position","of","the","caller","frame","."]
code: def compile(
      self,
      filename=None,
      mode="exec",
      flag=0,
      dont_inherit=0,
      _genframe=None,
  ):
      """return compiled code object. if filename is None
      invent an artificial filename which displays
      the source/line position of the caller frame.
      """
      if not filename or py.path.local(filename).check(file=0):
          if _genframe is None:
              _genframe = sys._getframe(1)  # the caller
          fn, lineno = _genframe.f_code.co_filename, _genframe.f_lineno
          base = "<%d-codegen " % self._compilecounter
          self.__class__._compilecounter += 1
          if not filename:
              filename = base + "%s:%d>" % (fn, lineno)
          else:
              filename = base + "%r %s:%d>" % (filename, fn, lineno)
      source = "\n".join(self.lines) + "\n"
      try:
          co = compile(source, filename, mode, flag)
      except SyntaxError:
          ex = sys.exc_info()[1]
          # re-represent syntax errors from parsing python strings
          msglines = self.lines[: ex.lineno]
          if ex.offset:
              msglines.append(" " * ex.offset + "^")
          msglines.append(
              "(code was compiled probably from here: %s)" % filename
          )
          newex = SyntaxError("\n".join(msglines))
          newex.offset = ex.offset
          newex.lineno = ex.lineno
          newex.text = ex.text
          raise newex
      else:
          if flag & _AST_FLAG:
              return co
          lines = [(x + "\n") for x in self.lines]
          linecache.cache[filename] = (1, None, lines, filename)
          return co
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import ast
  import inspect
  import linecache
  import sys
  import textwrap
  import tokenize
  import warnings
  from ast import PyCF_ONLY_AST
  from bisect import bisect_right
  import py
  import six
label_desc: Use image node_id 13 for calling the Source obj's underlying member method code with example usage: obj.compile(filename, mode, flag, dont_inherit, _genframe) and returns: co, co