code: def __init__(self, iterator: Tuple[Receiver, Sized]):
      receiver, it = iterator
      if isinstance(receiver, str):
          self.name = receiver
          self.callback = None
          self.is_iterate = True
      elif callable(receiver):
          self.name = receiver.__name__
          self.callback = receiver
          self.is_iterate = False
      else:
          raise ValueError("receiver must be str or callable", receiver)
  
      self.iterator = it
      self.size = len(it)
  
      self.idx = 0
  
file_path: labml/client/labml/internal/monitor/mix.py
imports: from typing import Tuple, Union, Callable, Any, List, cast, Sized, TYPE_CHECKING, Iterator
label_desc: Use image node_id 1 to create a new SplitIterator object  with example: obj = SplitIterator(iterator)