def bayesdb_generator_modelnos(bdb, generator_id):
    """Return list of model numbers associated with given `generator_id`."""
    sql = '''
        SELECT modelno FROM bayesdb_generator_model AS m
            WHERE generator_id = ?
            ORDER BY modelno ASC
    '''
    return [row[0] for row in bdb.sql_execute(sql, (generator_id,))]