This PR consolidates metadata handling functionality. Mainly it does two things:
Use a chainmap to ensure default metadata in _init_mapping_set()
Calls to _set_metadata_in_mapping_set to be directly inside _init_mapping_set()
Unfortunately, _set_metadata_in_mapping_set can't be completely deleted since it's used in one other place, but this is still a good reduction of complexity.
This PR consolidates metadata handling functionality. Mainly it does two things:
_init_mapping_set()
_set_metadata_in_mapping_set
to be directly inside_init_mapping_set()
Unfortunately,
_set_metadata_in_mapping_set
can't be completely deleted since it's used in one other place, but this is still a good reduction of complexity.