code: def __init__(self, f):
      self.find_stmt = 1  # next token begins a fresh stmt?
      self.level = 0  # current indent level
  
      # Raw file lines.
      self.raw = f.readlines()
  
      # File lines, rstripped & tab-expanded.  Dummy at start is so
      # that we can use tokenize's 1-based line numbering easily.
      # Note that a line is all-blank iff it's "\n".
      self.lines = [
          _rstrip(line).expandtabs() + "\n" for line in self.raw
      ]
      self.lines.insert(0, None)
      self.index = 1  # index into self.lines of next line
  
      # List of (lineno, indentlevel) pairs, one for each stmt and
      # comment line.  indentlevel is -1 for comment lines, as a
      # signal that tokenize doesn't know what to do about them;
      # indeed, they're our headache!
      self.stats = []
  
file_path: Theano/theano/misc/hooks/reindent.py
imports: from __future__ import absolute_import, print_function, division
  import tokenize
  import os, shutil
  import sys
  from six.moves import xrange
label_desc: Use image node_id 1 to create a new Reindenter object  with example: obj = Reindenter(f)