System.tag.configure with UDTs in Folder

In case anyone else runs into this, I wanted to pass along my solution.

I couldn't find any string manipulation that made sense, but did find that removing the 'path' keys from all dictionaries returned from system.tag.getConfiguration eliminated the _types_ folders that were erroneously being added.

This does not appear to work as expected if you are utilizing UDT Inheritance with overridden values. If you are then tags with an overridden value will be duplicated instead.
Edit: A hacky solution is to run the system.tag.configure function twice with 'o' for the collision policy. I'm pretty sure the root issue has something to do with the parent UDT getting created after the child UDT.

Example code below

global_udt_folder_path = '[global]_types_/global_UDTs'


def remove_path_keys(udt_configs):
	if isinstance(udt_configs, list):
		return [remove_path_keys(item) for item in udt_configs]
	elif isinstance(udt_configs, dict):
		return {
			key: remove_path_keys(value)
			for key, value in udt_configs.items()
			if key != "path"
		}
	else:
		return udt_configs


def global_udts():
	udt_configs = system.tag.getConfiguration(global_udt_folder_path, True)
	udt_configs = remove_path_keys(udt_configs)
	system.tag.configure('[default]_types_', udt_configs, 'o')