docstr: Constructs an Iterable from an iterator generator.
  
  Args:
      iterator_gen: A function that returns an iterator each time it
          is called. For example, this can be a generator function.
docstr_tok: ["Constructs","an","Iterable","from","an","iterator","generator",".","Args",":","iterator_gen",":","A","function","that","returns","an","iterator","each","time","it","is","called",".","For","example",",","this","can","be","a","generator","function","."]
code: def __init__(self, iterator_gen: Callable[[], Iterator[T]]):
      """Constructs an Iterable from an iterator generator.
  
      Args:
          iterator_gen: A function that returns an iterator each time it
              is called. For example, this can be a generator function.
      """
      self.iterator_gen = iterator_gen
  
imports: import abc
  import time
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, Iterator, List, Optional, Tuple, TypeVar, Union
  import numpy
  from ray.data._internal.block_batching.iter_batches import iter_batches
  from ray.data._internal.stats import DatasetStats, StatsManager
  from ray.data.block import Block, BlockAccessor, BlockMetadata, DataBatch, _apply_strict_mode_batch_format
  from ray.types import ObjectRef
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 1 to create a new _IterableFromIterator object from inherited base classes: Iterable with example: obj = _IterableFromIterator(iterator_gen)