def _extract_patch(img_b, coord, patch_size):
    """ Extract a single patch """
    x_start = int(coord[0])
    x_end = x_start + int(patch_size[0])
    y_start = int(coord[1])
    y_end = y_start + int(patch_size[1])

    patch = img_b[:, x_start:x_end, y_start:y_end]
    return patch