docstr: Get context lines, starting at new_topvisible and working backwards.
  
  Stop when stopline or stopindent is reached. Return a tuple of context
  data and the indent level at the top of the region inspected.
docstr_tok: ["Get","context","lines",",","starting","at","new_topvisible","and","working","backwards",".","Stop","when","stopline","or","stopindent","is","reached",".","Return","a","tuple","of","context","data","and","the","indent","level","at","the","top","of","the","region","inspected","."]
code: def get_context(self, new_topvisible, stopline=1, stopindent=0):
      """Get context lines, starting at new_topvisible and working backwards.
  
      Stop when stopline or stopindent is reached. Return a tuple of context
      data and the indent level at the top of the region inspected.
  
      """
      assert stopline > 0
      lines = []
      # The indentation level we are currently in:
      lastindent = INFINITY
      # For a line to be interesting, it must begin with a block opening
      # keyword, and have less indentation than lastindent.
      for linenum in xrange(new_topvisible, stopline - 1, -1):
          indent, text, opener = self.get_line_info(linenum)
          if indent < lastindent:
              lastindent = indent
              if opener in ("else", "elif"):
                  # We also show the if statement
                  lastindent += 1
              if (
                  opener
                  and linenum < new_topvisible
                  and indent >= stopindent
              ):
                  lines.append((linenum, indent, text, opener))
              if lastindent <= stopindent:
                  break
      lines.reverse()
      return lines, lastindent
  
file_path: catboost/contrib/tools/python/src/Lib/idlelib/CodeContext.py
imports: import Tkinter
  from Tkconstants import TOP, LEFT, X, W, SUNKEN
  import re
  from sys import maxint
  from idlelib.configHandler import idleConf
label_desc: Use image node_id 4 for calling the CodeContext obj's underlying member method code with example usage: obj.get_context(new_topvisible, stopline, stopindent) and returns: lines,  lastindent