def METHOD_NAME(bit_string: str) -> Bitnum:
    # Round-trips the bitnum conversion.
    bin = Bitnum(f"0b{bit_string}", width, is_signed).str_value()
    hex = Bitnum(f"0x{hex_string}", width, is_signed).str_value()
    assert bin == hex
    return Bitnum(bin, width, is_signed)