'Store mappings as OrderedDicts instead of as regular python
dictionaries to preserve file ordering.'

def construct_mapping(self, node, deep=False):

    if (not isinstance(node, MappingNode)):
        raise ConstructorError(None, None, ('expected    a    mapping    node,    but    found    %s' % node.id), node.start_mark)
    mapping = syaml_dict()
    for (key_node, value_node) in node.value:
        key = self.construct_object(key_node, deep=deep)
        try:
            hash(key)
        except TypeError as exc:
            raise ConstructorError('while    constructing    a    mapping', node.start_mark, ('found    unacceptable    key    (%s)' % exc), key_node.start_mark)
        value = self.construct_object(value_node, deep=deep)
        if (key in mapping):
            raise ConstructorError('while    constructing    a    mapping', node.start_mark, ('found    already    in-use    key    (%s)' % key), key_node.start_mark)
        mapping[key] = value
    mark(mapping, node)
    return mapping
