def _run_query(query, arguments, evaluator=None, ctx=None):
    """
    Runs a LQL query and returns a dataframe with the results.

    :param str query: The LQL query to run.
    :param dict arguments: A dict containing the arguments to send to the LQL
        evaluator.
    :param str evaluator: Optional string with an evaluator ID.
    :param obj ctx: An optional Lacework context object.
    :return: A pandas DataFrame with the results from the query.
    """
    if not ctx:
        raise ValueError("Unable to run query, no context available.")

    client = ctx.client
    if not client:
        raise ValueError("Unable to run query, no client set.")

    return client.queries.execute(
        evaluator_id=evaluator, query_text=query, arguments=arguments)