          for warncat in (FutureWarning, DeprecationWarning, UserWarning):
              warnings.simplefilter(action='ignore', category=warncat)
  
  
  def rotate_landmarks(face, rotation_matrix):
      # pylint:disable=c-extension-no-member
      """ Rotate the landmarks and bounding box for faces
          found in rotated images.
          Pass in a DetectedFace object, Alignments dict or BoundingBox"""
      logger = logging.getLogger(__name__)  # pylint:disable=invalid-name
 
</s> remove         assert length >= self.batchsize, msg
 </s> add         try:
            assert length >= self.batchsize, msg
        except AssertionError as err:
            msg += ("\nYou should increase the number of images in your training set or lower "
                    "your batch-size.")
            raise FaceswapError(msg) from err </s> remove         assert height == width and height % 2 == 0
 </s> add         try:
            assert height == width and height % 2 == 0
        except AssertionError as err:
            msg = ("Training images should be square with an even number of pixels across each "
                   "side. An image was found with width: {}, height: {}."
                   "\nMost likely this is a frame rather than a face within your training set. "
                   "\nMake sure that the only images within your training set are faces generated "
                   "from the Extract process.".format(width, height))
            raise FaceswapError(msg) from err
def deprecation_warning(func_name, additional_info=None):
    """ Log at warning level that a function will be removed in future """
    logger = logging.getLogger(__name__)  # pylint:disable=invalid-name
    logger.debug("func_name: %s, additional_info: %s", func_name, additional_info)
    msg = "{}  has been deprecated and will be removed from a future update.".format(func_name)
    if additional_info is not None:
        msg += " {}".format(additional_info)
    logger.warning(msg)


          for warncat in (FutureWarning, DeprecationWarning, UserWarning):
              warnings.simplefilter(action='ignore', category=warncat)
  
  
def deprecation_warning(func_name, additional_info=None):
    """ Log at warning level that a function will be removed in future """
    logger = logging.getLogger(__name__)  # pylint:disable=invalid-name
    logger.debug("func_name: %s, additional_info: %s", func_name, additional_info)
    msg = "{}  has been deprecated and will be removed from a future update.".format(func_name)
    if additional_info is not None:
        msg += " {}".format(additional_info)
    logger.warning(msg)


  def rotate_landmarks(face, rotation_matrix):
      # pylint:disable=c-extension-no-member
      """ Rotate the landmarks and bounding box for faces
          found in rotated images.
          Pass in a DetectedFace object, Alignments dict or BoundingBox"""
      logger = logging.getLogger(__name__)  # pylint:disable=invalid-name
keep keep keep add keep keep keep keep keep keep
 Deprecation Warnings, Error Handling and Bugfix

Deprecation Warning: Rotation in Extract
Deprecation Warning: Multiple models within a single folder
Error Handling: Useful message for training size assertion error
Error Handling: Useful message for fewer images than batch size
Bugfix: BoundingBox object sometimes not available inside spawned process 
lib/utils.py