def METHOD_NAME(path : str, image_box :Image.Image, shape=None, use_alpha_as_mask=False):
    # use_alpha_as_mask: Read the alpha channel of the image as the mask image
    image = load_image(path, image_box)
    image = image.convert('RGBA') if use_alpha_as_mask else image.convert('RGB')
    image = image.resize(shape, resample=Image.LANCZOS) if shape is not None else image
    mask_image = None
    if use_alpha_as_mask:
        # Split alpha channel into a mask_image
        red, green, blue, alpha = Image.Image.split(image) # not interested in R G or B, just in the alpha channel
        mask_image = alpha.convert('L')
        image = image.convert('RGB')
        # check using init image alpha as mask if mask is not blank
        extrema = mask_image.getextrema()
        if (extrema == (0,0)) or extrema == (255,255):
            print("use_alpha_as_mask==True: Using the alpha channel from the init image as a mask, but the alpha channel is blank.")
            print("ignoring alpha as mask.")
            mask_image = None
    return image, mask_image