def map_constructor(self, loader,  node, deep=False):
mapping = {}<EOL>for key_node, value_node in node.value:<EOL><INDENT>key = loader.construct_object(key_node, deep=deep)<EOL>value = loader.construct_object(value_node, deep=deep)<EOL>if key in mapping:<EOL><INDENT>raise ValueError(f"<STR_LIT>")<EOL><DEDENT>mapping[key] = value<EOL><DEDENT>return mapping<EOL>
Walk the mapping, recording any duplicate keys.