def is_annotation_size_unusual(annotation, minimum_size, minimum_aspect_ratio, maximum_aspect_ratio):
    """
    Checks if object described by annotation has unusual size - is too small or has unusual aspect ratio
    :param annotation: net.utilities.Annotation instance
    :param minimum_size: int, minimum size object must have to be considered normal
    :param minimum_aspect_ratio: float, minimum aspect ratio object must have to be considered normal.
    Both width to height and height to width ratios are tested against this criterion
    :param maximum_aspect_ratio: float, maximum aspect ratio object must have to be considered normal.
    Both width to height and height to width ratios are tested against this criterion
    :return: bool, True if object size is unusual, False otherwise
    """

    if annotation.width < minimum_size or annotation.height < minimum_size:
        return True

    if annotation.aspect_ratio < minimum_aspect_ratio or 1 / annotation.aspect_ratio < minimum_aspect_ratio:
        return True

    if annotation.aspect_ratio > maximum_aspect_ratio or 1 / annotation.aspect_ratio > maximum_aspect_ratio:
        return True

    return False