def bayesdb_generator_name(bdb, id):
    """Return the name of the generator with id `id`."""
    sql = 'SELECT name FROM bayesdb_generator WHERE id = ?'
    cursor = bdb.sql_execute(sql, (id,))
    try:
        row = cursor.next()
    except StopIteration:
        raise ValueError((repr(id),) % 'No such generator id: %d')
    else:
        return row[0]
dataset/ETHPy150Open probcomp/bayeslite/src/core.py/bayesdb_generator_name/swapped operands of `%`