def METHOD_NAME(mode: int) -> bool:
    """Check if permissions are valid.
    Sensible file permission modes don't have write bit set when read bit
    is not set and don't have execute bit set when user execute bit is
    not set.
    Also, user permissions are more generous than group permissions and
    user and group permissions are more generous than world permissions.
    """
    other_write_without_read = (
        mode % 8 and mode % 8 < 4 and not (mode % 8 == 1 and (mode >> 6) % 2 == 1)
    )
    group_write_without_read = (
        (mode >> 3) % 8
        and (mode >> 3) % 8 < 4
        and not ((mode >> 3) % 8 == 1 and (mode >> 6) % 2 == 1)
    )
    user_write_without_read = (
        (mode >> 6) % 8 and (mode >> 6) % 8 < 4 and (mode >> 6) % 8 != 1
    )
    other_more_generous_than_group = mode % 8 > (mode >> 3) % 8
    other_more_generous_than_user = mode % 8 > (mode >> 6) % 8
    group_more_generous_than_user = (mode >> 3) % 8 > (mode >> 6) % 8
    return bool(
        other_write_without_read
        or group_write_without_read
        or user_write_without_read
        or other_more_generous_than_group
        or other_more_generous_than_user
        or group_more_generous_than_user,
    )