      @staticmethod
      def _get_item(queue):
          """ Yield one item from a queue """
          item = queue.get()
          if isinstance(item, dict):
              logger.trace("item: %s, queue: %s",
                           {k: v.shape if isinstance(v, np.ndarray) else v
                            for k, v in item.items()},
                           queue)
          else:
              logger.trace("item: %s, queue: %s", item, queue)
          return item
  
      # <<< MISC UTILITY METHODS >>> #
 
</s> remove     @staticmethod
    def _get_item(queue):
 </s> add     def _get_item(self, queue): </s> remove     # <<< MISC UTILITY METHODS >>> #
    def _convert_color(self, image):
        """ Convert the image to the correct color format and strip alpha channel """
        logger.trace("Converting image to color format: %s", self.colorformat)
        if self.colorformat == "RGB":
            cvt_image = image[..., 2::-1].copy()
        elif self.colorformat == "GRAY":
            cvt_image = cv2.cvtColor(image.copy(), cv2.COLOR_BGR2GRAY)
        else:
            cvt_image = image[..., :3].copy()
        return cvt_image

 </s> add  </s> remove             logger.trace("final output: %s", {k: v.shape if isinstance(v, np.ndarray) else v
                                              for k, v in item.items()})
            yield item
 </s> add             output = self._extract_media.pop(item["filename"])
            output.add_detected_faces(item["detected_faces"])
            logger.trace("final output: (filename: '%s', image shape: %s, detected_faces: %s, "
                         "item: %s", output.filename, output.image_shape, output.detected_faces,
                         output)
            yield output </s> remove                                                  for k, v in batch.items() if k != "image"})
 </s> add                                                  for k, v in batch.items()}) </s> remove                              item["filename"], len(item["detected_faces"]))
                self._faces_per_filename[item["filename"]] = len(item["detected_faces"])
 </s> add                              item.filename, len(item.detected_faces))
                self._faces_per_filename[item.filename] = len(item.detected_faces)
        if isinstance(item, ExtractMedia):
            logger.trace("filename: '%s', image shape: %s, detected_faces: %s, queue: %s, "
                         "item: %s",
                         item.filename, item.image_shape, item.detected_faces, queue, item)
            self._extract_media[item.filename] = item
      @staticmethod
      def _get_item(queue):
          """ Yield one item from a queue """
          item = queue.get()
        if isinstance(item, ExtractMedia):
            logger.trace("filename: '%s', image shape: %s, detected_faces: %s, queue: %s, "
                         "item: %s",
                         item.filename, item.image_shape, item.detected_faces, queue, item)
            self._extract_media[item.filename] = item
        if isinstance(item, ExtractMedia):
            logger.trace("filename: '%s', image shape: %s, detected_faces: %s, queue: %s, "
                         "item: %s",
                         item.filename, item.image_shape, item.detected_faces, queue, item)
            self._extract_media[item.filename] = item
        if isinstance(item, ExtractMedia):
            logger.trace("filename: '%s', image shape: %s, detected_faces: %s, queue: %s, "
                         "item: %s",
                         item.filename, item.image_shape, item.detected_faces, queue, item)
            self._extract_media[item.filename] = item
        if isinstance(item, ExtractMedia):
            logger.trace("filename: '%s', image shape: %s, detected_faces: %s, queue: %s, "
                         "item: %s",
                         item.filename, item.image_shape, item.detected_faces, queue, item)
            self._extract_media[item.filename] = item
        if isinstance(item, ExtractMedia):
            logger.trace("filename: '%s', image shape: %s, detected_faces: %s, queue: %s, "
                         "item: %s",
                         item.filename, item.image_shape, item.detected_faces, queue, item)
            self._extract_media[item.filename] = item
          else:
              logger.trace("item: %s, queue: %s", item, queue)
          return item
  
      # <<< MISC UTILITY METHODS >>> #
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 plugins.extract - Create ExtractMedia class for pipeline flow
Bugfix - Fix memory leak in extract 
plugins/extract/_base.py