def instrument_name_to_program(instrument_name):

    normalized_inst_name = __normalize_str(instrument_name)
    # Create a list of the entries INSTRUMENT_MAP, normalized, to search over
    normalized_inst_names = [__normalize_str(name) for name in
                             INSTRUMENT_MAP]

    # If the normalized drum name is not found, complain
    try:
        program_number = normalized_inst_names.index(normalized_inst_name)
    except:
        raise ValueError('{} is not a valid General MIDI instrument '
                         'name.'.format(instrument_name))

    # Return the index (program number) if a match was found
    return program_number
It used to be that the first argument of prettyplotlib had to be the 'ax'
dataset/ETHPy150Open craffel/pretty-midi/pretty_midi/utilities.py/instrument_name_to_program--crossover with--dataset/ETHPy150Open olgabot/prettyplotlib/prettyplotlib/utils.py/maybe_get_fig_ax