def check_access(cursor, worker_id, task_namespace, experiment_id):
    """Check if there already exists a row for this worker and experiment combination"""
    cursor.execute(
        "SELECT count(*) FROM workers WHERE worker_id = ? AND task_namespace = ? AND experiment_id = ?",
        (worker_id, task_namespace, experiment_id),
    )
    return cursor.fetchone()[0] == 0