def compass_angle(data: list, angles: tuple = (0.0, 360.0)) -> list:
    """
    Filter out images that do not lie within compass angle range

    :param data: The data to be filtered
    :type data: list

    :param angles: The compass angle range to filter through
    :type angle: tuple of floats

    :return: A feature list
    :rtype: list
    """

    if len(angles) != 2:
        raise ValueError("Angles must be a tuple of length 2")
    if angles[0] > angles[1]:
        raise ValueError("First angle must be less than second angle")
    if angles[0] < 0.0 or angles[1] > 360.0:
        raise ValueError("Angles must be between 0 and 360")

    return [
        feature
        for feature in data
        if angles[0] <= feature["properties"]["compass_angle"] <= angles[1]
    ]