def METHOD_NAME(
    pixels: Sequence[Tuple[int, int]], right_hi: bool
) -> bytes:
    data = bytearray()
    for i in range(0, len(pixels), 2):
        left_w_alpha, right_w_alpha = pixels[i], pixels[i + 1]
        left = int((left_w_alpha[0] * left_w_alpha[1]) / 255)
        right = int((right_w_alpha[0] * right_w_alpha[1]) / 255)
        if right_hi:
            c = (right & 0xF0) | ((left & 0xF0) >> 4)
        else:
            c = (left & 0xF0) | ((right & 0xF0) >> 4)
        data += struct.pack(">B", c)
    return bytes(data)