assertto_return==None,f"Duplicate thing that starts with '{starts_with}' found in {name_of_overarching_thing} called {thing.name}"
to_return=thing
assert to_return!=None,f"Couldn't find thing that starts with '{starts_with}' as a child of '{name_of_overarching_thing}', but one is required"
if required:assert to_return!=None,f"Couldn't find thing that starts with '{starts_with}' as a child of '{name_of_overarching_thing}', but one is required"
#cProfile.run("export_everything") # gave up optimizing this because after reading this output I'm not sure what the best direction is, it seems like it's just a lot of data, specifically the images, is why it's slow... I could hash them and only write if the hash changes but whatever