      def __init__(self, target, *args, thread_count=1, name=None, **kwargs):
          self._name = name if name else target.__name__
          logger.debug("Initializing %s: (target: '%s', thread_count: %s)",
                       self.__class__.__name__, self._name, thread_count)
          logger.trace("args: %s, kwargs: %s", args, kwargs)
          self.daemon = True
          self._thread_count = thread_count
          self._threads = list()
          self._target = target
          self._args = args
 
</s> remove         self._threads = list()
 </s> add         self._threads: List[FSThread] = [] </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             name = "{}_{}".format(self._name, idx)
 </s> add             name = self._name if self._thread_count == 1 else f"{self._name}_{idx}" </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     def completed(self):
        """ Return False if there are any alive threads else True """
 </s> add     def completed(self) -> bool:
        """ Check if all threads have completed

        Returns
        -------
        ``True`` if all threads have completed otherwise ``False``
        """
        logger.trace("args: %s, kwargs: %s", args, kwargs)  # type:ignore
      def __init__(self, target, *args, thread_count=1, name=None, **kwargs):
          self._name = name if name else target.__name__
          logger.debug("Initializing %s: (target: '%s', thread_count: %s)",
                       self.__class__.__name__, self._name, thread_count)
        logger.trace("args: %s, kwargs: %s", args, kwargs)  # type:ignore
          self.daemon = True
          self._thread_count = thread_count
          self._threads = list()
          self._target = target
          self._args = args
keep keep keep keep replace keep keep keep keep keep
 bugfix - timelapse image loader
multithreading.py - typing + docs 
lib/multithreading.py