def on_yaml_imported(self, yaml):
def represent_ordereddict(dumper, data):<EOL><INDENT>"""<STR_LIT>"""<EOL>values = []<EOL>for (key, value) in data.items():<EOL><INDENT>values.append(<EOL>(dumper.represent_data(key), dumper.represent_data(value))<EOL>)<EOL><DEDENT>return yaml.MappingNode("<STR_LIT>", values)<EOL><DEDENT>yaml.add_representer(OrderedDict, represent_ordereddict)<EOL>
The `pyyaml <https://pypi.org/project/pyyaml/>`_ import hook.

        :param module yaml: The ``yaml`` module