def get_library_index(library, label):
    """Find index in library of function corresponding to a given label"""
    for idx, name in enumerate(library.keys()):
        if name == label:
            return idx

    return -1