def generate_args_from_keys(data, keys):
    """
    Build an args list from the data parameters passed in.
    This list is converted to a tuple and sent in. The order of the tuple values will match the order of the keys
    """

    res = []
    for k in keys:
        if not data.has_key(k):
            raise Exception("Invalid data. All required parameters need to be present. Missing Key: [%s]" % k)

        res.append(data.get(k))

    return tuple(res)