class_docstr: Wrapper for a token-based input transformer.
  
  func should accept a list of tokens (5-tuples, see tokenize docs), and
  return an iterable which can be passed to tokenize.untokenize().
class_docstr_tok: ["Wrapper","for","a","token-based","input","transformer",".","func","should","accept","a","list","of","tokens","(","5-tuples",",","see","tokenize","docs",")",",","and","return","an","iterable","which","can","be","passed","to","tokenize.untokenize","(",")","."]
code: def push(self, line):
      self.buf.append(line + "\n")
      if all(l.isspace() for l in self.buf):
          return self.reset()
  
      tokens = []
      stop_at_NL = False
      try:
          for intok in self.tokenizer:
              tokens.append(intok)
              t = intok[0]
              if t == tokenize.NEWLINE or (
                  stop_at_NL and t == tokenize.NL
              ):
                  # Stop before we try to pull a line we don't have yet
                  break
              elif t == tokenize.ERRORTOKEN:
                  stop_at_NL = True
      except TokenError:
          # Multi-line statement - stop and try again with the next line
          self.reset_tokenizer()
          return None
  
      return self.output(tokens)
  
imports: import abc
  import functools
  import re
  import tokenize
  from tokenize import untokenize, TokenError
  from io import StringIO
  from IPython.core.splitinput import LineInfo
  from IPython.utils import tokenutil
label_desc: Use image node_id 3 for calling the TokenInputTransformer obj's underlying member method code with example usage: obj.push(line) and returns: self, self, None