def execute_query(
    session: Session,
    query: str,
    parameters: Optional[tuple] = None,
) -> List[Row]:
    """
    Executes a query with optional parameters with qmark parameter binding (if applicable).
    """
    try:
        return session.sql(query, params=parameters).collect()
    except Exception as e:
        logger.exception(
            f"Error executing query: {query}\nParameters: {parameters}\nError: {e}"
        )
        raise

    Executes a query with optional parameters with qmark parameter binding (if applicable).
    
src/connectors/snowflake/trulens/connectors/snowflake/dao/sql_utils.py