class_docstr: Create an object which can be iterated over multiple times from a
  generator call. Each iteration will call the generator and allow iterating
  over it. This is unsafe to use on generators which have side effects, such
  as file readers; it's up to the callers to safely manage these scenarios.
class_docstr_tok: ["Create","an","object","which","can","be","iterated","over","multiple","times","from","a","generator","call",".","Each","iteration","will","call","the","generator","and","allow","iterating","over","it",".","This","is","unsafe","to","use","on","generators","which","have","side","effects",",","such","as","file","readers",";","it","'s","up","to","the","callers","to","safely","manage","these","scenarios","."]
code: def __init__(self, generator, *args, **kwargs):
      self.generator = generator
      self.args = args
      self.kwargs = kwargs
  
imports: import json
  import logging
  import re
  from typing import Any, Dict, List, Type, TypeVar
  from pytext.config.component import Component, ComponentType
  from pytext.data.utils import shard
  from pytext.utils.data import parse_slot_string, Slot
  from pytext.utils.file_io import PathManager
label_desc: Use image node_id 1 to create a new GeneratorIterator object  with example: obj = GeneratorIterator(generator)