def pack_4_4(x: int, y: int) -> int:
    """Pack two 4-bit values into an
    8-bit value.
    x and y must be in range 0..15 inclusive.
    Result is in range 0..255 inclusive.
    """
    assert 0 <= x <= 15
    assert 0 <= y <= 15
    return (x << 4) | y