def validate_password(data):
    """
    Validates the given password in a request data. First, checks if
    it exists, then check if the password has the necessary length
    :param data: Dict containing all the request data
    :return: Boolean determining the request has a valid password
    """

    if "password" not in data:
        return False
    password = data["password"]
    if len(password) < 4 or len(password) > 16:
        return False

    return True