def set_bit(number: int, position: int, value: bool) -> int:
    """
    Returns number if you were to set the nth bit to "value".

    0 refers to the LSB, aka 1s place.
    """
    return (
        (number | (1 << position)) if value else
        (number & ~(1 << position))
    )