parameters: (self, new_topvisible, stopline=1, stopindent=0)
return_statement: return lines, lastindent
docstring: 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.
docstring_summary: Get context lines, starting at new_topvisible and working backwards.
docstring_tokens: Get context lines starting at new_topvisible and working backwards .
function: 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
function_tokens: def get_context ( self , new_topvisible , stopline = 1 , stopindent = 0 ) : 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