code: def __init__(self, text, use_tqdm=True):
      super().__init__()
  
      self.lines = text.split("\n")
      self.num_lines = len(self.lines)
      if self.num_lines > 1000 and use_tqdm:
          self.line_iterator = iter(tqdm(self.lines))
      else:
          self.line_iterator = iter(self.lines)
  
imports: from collections import deque
  import logging
  import os
  import re
  from stanza.models.constituency.parse_tree import Tree
  from stanza.utils.get_tqdm import get_tqdm
label_desc: Use image node_id 1 to create a new TextTokenIterator object from inherited base classes: TokenIterator with example: obj = TextTokenIterator(text, use_tqdm)