class_docstr: Wraps an iterable with a user-defined map function for N epochs.
class_docstr_tok: ["Wraps","an","iterable","with","a","user-defined","map","function","for","N","epochs","."]
code: def __iter__(self):
      if self.epochs:
          for _ in range(self.epochs):
              for x in self.data:
                  yield self.map_fn(x)
      else:
          while True:
              for x in self.data:
                  yield self.map_fn(x)
  
imports: import contextlib
  import glob
  import horovod.torch
  import os
  from horovod.spark.common import constants
  from horovod.spark.common.datamodule import DataModule
label_desc: Use image node_id 2 for calling the MapIterable obj's underlying member method code with example usage: obj.__iter__() without return types