  
              iterator[side] = self._load_generator(side,
                                                    True,
                                                    batch_size=batch_size,
                                                    images=imgs).minibatch_ab()
          logger.debug("Set time-lapse feed: %s", self._display_feeds["timelapse"])
  
  
  class _Samples():  # pylint:disable=too-few-public-methods
      """ Compile samples for display for preview and time-lapse
 
</s> remove     """ Subclass of thread that passes errors back to parent """
    def __init__(self, group=None, target=None, name=None,  # pylint: disable=too-many-arguments
                 args=(), kwargs=None, *, daemon=None):
        super().__init__(group=group, target=target, name=name,
                         args=args, kwargs=kwargs, daemon=daemon)
        self.err = None

    def check_and_raise_error(self):
        """ Checks for errors in thread and raises them in caller """
 </s> add     """ Subclass of thread that passes errors back to parent

    Parameters
    ----------
    target: callable object, Optional
        The callable object to be invoked by the run() method. If ``None`` nothing is called.
        Default: ``None``
    name: str, optional
        The thread name. if ``None`` a unique name is constructed of the form "Thread-N" where N
        is a small decimal number. Default: ``None``
    args: tuple
        The argument tuple for the target invocation. Default: ().
    kwargs: dict
        keyword arguments for the target invocation. Default: {}.
    """
    _target: Callable
    _args: Tuple
    _kwargs: Dict[str, Any]
    _name: str

    def __init__(self,
                 target: Optional[Callable] = None,
                 name: Optional[str] = None,
                 args: Tuple = (),
                 kwargs: Dict[str, Any] = None,
                 *,
                 daemon: Optional[bool] = None) -> None:
        super().__init__(target=target, name=name, args=args, kwargs=kwargs, daemon=daemon)
        self.err: _ErrorType = None

    def check_and_raise_error(self) -> None:
        """ Checks for errors in thread and raises them in caller.

        Raises
        ------
        Error
            Re-raised error from within the thread
        """ </s> remove     """ Threading for IO heavy ops
        Catches errors in thread and rethrows to parent """
    def __init__(self, target, *args, thread_count=1, name=None, **kwargs):
        self._name = name if name else target.__name__
 </s> add     """ Threading for IO heavy ops. Catches errors in thread and rethrows to parent.

    Parameters
    ----------
    target: callable object
        The callable object to be invoked by the run() method.
    args: tuple
        The argument tuple for the target invocation. Default: ().
    thread_count: int, optional
        The number of threads to use. Default: 1
    name: str, optional
        The thread name. if ``None`` a unique name is constructed of the form {target.__name__}_N
        where N is an incrementing integer. Default: ``None``
    kwargs: dict
        keyword arguments for the target invocation. Default: {}.
    """
    def __init__(self,
                 target: Callable,
                 *args,
                 thread_count: int = 1,
                 name: Optional[str] = None,
                 **kwargs) -> None:
        self._name = _get_name(name if name else target.__name__) </s> remove     """ Run a queue in the background. From:
        https://stackoverflow.com/questions/7323664/ """
    # See below why prefetch count is flawed
    def __init__(self, generator, prefetch=1, thread_count=2,
                 queue=None, args=None, kwargs=None):
        # pylint:disable=too-many-arguments
        super().__init__(target=self._run, thread_count=thread_count)
        self.queue = queue or Queue.Queue(prefetch)
 </s> add     """ Run a task in the background background and queue data for consumption

    Parameters
    ----------
    generator: iterable
        The generator to run in the background
    prefetch, int, optional
        The number of items to pre-fetch from the generator before blocking (see Notes). Default: 1
    name: str, optional
        The thread name. if ``None`` a unique name is constructed of the form
        {generator.__name__}_N where N is an incrementing integer. Default: ``None``
   args: tuple, Optional
        The argument tuple for generator invocation. Default: ``None``.
    kwargs: dict, Optional
        keyword arguments for the generator invocation. Default: ``None``.

    Notes
    -----
    Putting to the internal queue only blocks if put is called while queue has already
    reached max size. Therefore this means prefetch is actually 1 more than the parameter
    supplied (N in the queue, one waiting for insertion)

    References
    ----------
    https://stackoverflow.com/questions/7323664/
    """
    def __init__(self,
                 generator: Callable,
                 prefetch: int = 1,
                 name: Optional[str] = None,
                 args: Optional[Tuple] = None,
                 kwargs: Optional[Dict[str, Any]] = None) -> None:
        super().__init__(name=name, target=self._run)
        self.queue: Queue.Queue = Queue.Queue(prefetch) </s> remove     def join(self):
 </s> add     def join(self) -> None: </s> remove     def start(self):
        """ Start a thread with the given method and args """
 </s> add     def start(self) -> None:
        """ Start all the threads for the given method, args and kwargs """
                                                  images=imgs).minibatch_ab(do_shuffle=False)
  
              iterator[side] = self._load_generator(side,
                                                    True,
                                                    batch_size=batch_size,
                                                  images=imgs).minibatch_ab(do_shuffle=False)
          logger.debug("Set time-lapse feed: %s", self._display_feeds["timelapse"])
  
  
  class _Samples():  # pylint:disable=too-few-public-methods
      """ Compile samples for display for preview and time-lapse
keep keep keep keep replace keep keep keep keep keep
 bugfix - timelapse image loader
multithreading.py - typing + docs 
plugins/train/trainer/_base.py