          """ Join threads for current pass """
          for plugin in self._active_plugins:
              plugin.join()
  
      def _check_and_raise_error(self):
          """ Check all threads for errors and raise if one occurs """
          for plugin in self._active_plugins:
              if plugin.check_and_raise_error():
                  return True
          return False
 
</s> remove     def _get_plugin_type_and_index(flow_phase):
 </s> add     def _get_plugin_type_and_index(flow_phase: str) -> Tuple[str, Optional[int]]: </s> remove         if self._vram_stats["vram_free"] <= self._total_vram_required:
 </s> add         if cast(int, self._vram_stats["vram_free"]) <= self._total_vram_required: </s> remove     def _all_plugins(self):
 </s> add     def _all_plugins(self) -> List["PluginExtractor"]: </s> remove         logger.trace(retval)
 </s> add         logger.trace(retval)  # type: ignore </s> remove         idx = flow_phase.split("_")[-1]
        if idx.isdigit():
            idx = int(idx)
 </s> add         sidx = flow_phase.split("_")[-1]
        if sidx.isdigit():
            idx: Optional[int] = int(sidx)
    def _check_and_raise_error(self) -> bool:
          """ Join threads for current pass """
          for plugin in self._active_plugins:
              plugin.join()
  
    def _check_and_raise_error(self) -> bool:
          """ Check all threads for errors and raise if one occurs """
          for plugin in self._active_plugins:
              if plugin.check_and_raise_error():
                  return True
          return False
keep keep keep keep replace keep keep keep keep keep
 extract: Add batch processing mode 
plugins/extract/pipeline.py