import numpy as np
img = np.array([
    [255, 255, 0,   0  ],
    [255, 255, 0,   0  ],
    [0,   0,   255, 255],
    [0,   0,   255, 255]
], dtype=np.uint8)