def METHOD_NAME(pil_image):
    """
    Construct Image from supplied PIL image object.
    :param pil_image: PIL image object
    :type pil_image: PIL.Image.Image
    :raises RuntimeError: If the PIL Image provided is not in a recognized
       mode.
    :returns: New Image instance using the given image's pixels.
    :rtype: Image
    """
    (img_width, img_height) = pil_image.size
    mode = pil_image.mode
    # TODO(paul.tunison): Extract this logic out into a utility function.
    if mode == "1":  # boolean
        img_depth = 1
        img_w_step = 1
        img_h_step = img_width
        img_d_step = 0
        img_pix_num_bytes = 1
        img_pix_type = Image.PIXEL_BOOL
    elif mode == "L":  # 8-bit greyscale
        img_depth = 1
        img_w_step = 1
        img_h_step = img_width
        img_d_step = 0
        img_pix_num_bytes = 1
        img_pix_type = Image.PIXEL_UNSIGNED
    elif mode == "RGB": # 8-bit RGB
        img_depth = 3
        img_w_step = 3
        img_h_step = img_width * 3
        img_d_step = 1
        img_pix_num_bytes = 1
        img_pix_type = Image.PIXEL_UNSIGNED
    elif mode == "RGBA":  # 8-bit RGB with alpha
        img_depth = 4
        img_w_step = 4
        img_h_step = img_width * 4
        img_d_step = 1
        img_pix_num_bytes = 1
        img_pix_type = Image.PIXEL_UNSIGNED
    elif mode == "I":  # 32-bit signed int greyscale
        img_depth = 1
        img_w_step = 1
        img_h_step = img_width
        img_d_step = 0
        img_pix_num_bytes = 4
        img_pix_type = Image.PIXEL_SIGNED
    elif mode == "F":  # 32-bit float greyscale
        img_depth = 1
        img_w_step = 1
        img_h_step = img_width
        img_d_step = 0
        img_pix_num_bytes = 4
        img_pix_type = Image.PIXEL_FLOAT
    else:
        raise RuntimeError("Unsupported image format.")
    img_data = _pil_image_to_bytes(pil_image)
    vital_img = Image(img_data,
                      img_width, img_height, img_depth,
                      img_w_step, img_h_step, img_d_step,
                      img_pix_type, img_pix_num_bytes)
    return vital_img