              return image, None
          return self.rotate_image_by_angle(image, angle)
  
      @staticmethod
      def rotate_rect(d_rect, rotation_matrix):
          """ Rotate a dlib rect based on the rotation_matrix"""
          logger.trace("Rotating d_rectangle")
          d_rect = rotate_landmarks(d_rect, rotation_matrix)
          return d_rect
  
      @staticmethod
      def rotate_image_by_angle(image, angle,
                                rotated_width=None, rotated_height=None):
          """ Rotate an image by a given angle.
 
</s> remove     # <<< DLIB RECTANGLE METHODS >>> #
    @staticmethod
    def is_mmod_rectangle(d_rectangle):
        """ Return whether the passed in object is
            a dlib.mmod_rectangle """
        return isinstance(
            d_rectangle,
            dlib.mmod_rectangle)  # pylint: disable=c-extension-no-member

    def convert_to_dlib_rectangle(self, d_rect):
        """ Convert detected mmod_rects to dlib_rectangle """
        if self.is_mmod_rectangle(d_rect):
            return d_rect.rect
        return d_rect

 </s> add  </s> remove         face = face.to_dlib_rect()
 </s> add         face = face.to_bounding_box() </s> remove         Pass in a DetectedFace object, Alignments dict or DLib rectangle"""
 </s> add         Pass in a DetectedFace object, Alignments dict or BoundingBox""" </s> remove         """ Return the given bounding box in a dlib rectangle """
 </s> add         """ Return the given bounding box in a BoundingBox """ </s> remove         """ Set a dlib rectangle for predetected faces """
 </s> add         """ Set a BoundingBox for predetected faces """
    def rotate_rect(bounding_box, rotation_matrix):
        """ Rotate a BoundingBox based on the rotation_matrix"""
        logger.trace("Rotating BoundingBox")
        bounding_box = rotate_landmarks(bounding_box, rotation_matrix)
        return bounding_box
              return image, None
          return self.rotate_image_by_angle(image, angle)
  
      @staticmethod
    def rotate_rect(bounding_box, rotation_matrix):
        """ Rotate a BoundingBox based on the rotation_matrix"""
        logger.trace("Rotating BoundingBox")
        bounding_box = rotate_landmarks(bounding_box, rotation_matrix)
        return bounding_box
    def rotate_rect(bounding_box, rotation_matrix):
        """ Rotate a BoundingBox based on the rotation_matrix"""
        logger.trace("Rotating BoundingBox")
        bounding_box = rotate_landmarks(bounding_box, rotation_matrix)
        return bounding_box
    def rotate_rect(bounding_box, rotation_matrix):
        """ Rotate a BoundingBox based on the rotation_matrix"""
        logger.trace("Rotating BoundingBox")
        bounding_box = rotate_landmarks(bounding_box, rotation_matrix)
        return bounding_box
    def rotate_rect(bounding_box, rotation_matrix):
        """ Rotate a BoundingBox based on the rotation_matrix"""
        logger.trace("Rotating BoundingBox")
        bounding_box = rotate_landmarks(bounding_box, rotation_matrix)
        return bounding_box
    def rotate_rect(bounding_box, rotation_matrix):
        """ Rotate a BoundingBox based on the rotation_matrix"""
        logger.trace("Rotating BoundingBox")
        bounding_box = rotate_landmarks(bounding_box, rotation_matrix)
        return bounding_box
  
      @staticmethod
      def rotate_image_by_angle(image, angle,
                                rotated_width=None, rotated_height=None):
          """ Rotate an image by a given angle.
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 Remove dlib.rectangles. Replace with BoundingBox class 
plugins/extract/detect/_base.py