When running this code
def mergeYaml(priorityYaml, defaultYaml): finalYaml = {} if isinstance(defaultYaml, dict): for dk, dv in defaultYaml.items():