def METHOD_NAME(user,image):
    """ Evaluates the userid for a given user from a .raw image """
    userid = None
    if user == "root":
        logging.info(f"User is root, not checking for userid in the image, just using 0")
        return 0
    # Get passwd from given image
    logging.info(f"Getting userid for user {user} from image")
    cmd = f"guestfish -a {image} -i cat /etc/passwd"
    p = subprocess.run(shlex.split(cmd), shell=False, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True)
    # Get userid for given user
    lst_decode = p.stdout.decode()
    passwd_lst = lst_decode.splitlines()
    for i in passwd_lst:
        # Make sure we compare userfield
        i_split = i.split(":")
        if i_split[0] == user:
            # Return the userid
            userid = i_split[2]
            logging.info(f"User is present within image. Using userid: {userid}")
            return userid
    # We need to exit when the user is not present by the
    # given image.
    if userid is None:
        logging.info(f"User is NOT present within image. We can not proceed.")
        sys.exit(1)