code: def _iterator_op_factory(
      op_class, op_name, num_inputs, call_args_names
  ):
      class EagerOperator(
          _eager_op_base_factory(
              op_class, op_name, num_inputs, call_args_names
          )
      ):
          def __init__(self, call_args, *, max_batch_size, **kwargs):
              pad_last_batch = kwargs.get("pad_last_batch", False)
              kwargs["pad_last_batch"] = True
  
              super().__init__(max_batch_size=max_batch_size, **kwargs)
  
              self._call_args = call_args
              self._iter = 0
  
              epoch_size = self._backend_op.reader_meta()["epoch_size"]
              self._num_iters = (
                  epoch_size + max_batch_size - 1
              ) // max_batch_size
  
              # Size of the last batch in an epoch.
              if pad_last_batch or epoch_size % max_batch_size == 0:
                  self._last_batch_size = max_batch_size
              else:
                  self._last_batch_size = epoch_size % max_batch_size
  
              assert isinstance(self._last_batch_size, int)
  
          def __next__(self):
              """Iterates over dataset once per epoch (last batch may not be full)."""
  
              if self._iter == self._num_iters:
                  self._iter = 0
                  raise StopIteration
              else:
                  self._iter += 1
                  outputs = self._backend_op([], self._call_args)
  
                  if self._iter == self._num_iters:
                      # Return potentially partial batch at the end of an epoch.
                      outputs = [
                          _slice_tensorlist(
                              tl_output, self._last_batch_size
                          )
                          for tl_output in outputs
                      ]
  
                  if len(outputs) == 1:
                      outputs = outputs[0]
  
                  return outputs
  
          def __iter__(self):
              return self
  
          def __len__(self):
              return self._num_iters
  
      return EagerOperator
  
imports: import sys
  from nvidia.dali import backend
  from nvidia.dali import internal
  from nvidia.dali import ops
  from nvidia.dali import tensors
  from nvidia.dali import types
  from nvidia.dali.external_source import _prep_data_for_feed_input
label_desc: Use image node_id 36 for calling a global function with example usage: _iterator_op_factory(op_class, op_name, num_inputs, call_args_names) and returns: EagerOperator, self, self, outputs