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 __iter__(self):
      return self.generator(*self.args, **self.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 2 for calling the GeneratorIterator obj's underlying member method code with example usage: obj.__iter__() and returns: self