def _addsubimg(img, subimage, bbox):
    """
    Add a ``subimage`` to ``img`` at the specified ``bbox`` bounding
    box.
    """

    x0, x1, y0, y1 = bbox
    img[y0:y1, x0:x1] += subimage
    return img