for bike_number in list(input.keys()):
    product_name, list_of_parts = input[bike_number]
if product_name not in out:
    out[product_name] = []
out[product_name].append((bike_number, list_of_parts))
return out
new_dict = invert_dictionary(d)
print(new_dict['Racing Bike'])
Finding a an element of a list when the list is in a dictionary?