def METHOD_NAME(stream: Union[TextIO, str]) -> Any:
    """Safely load YAML in ordered manner."""
    class YamlLoader(_SafeOrderedLoader):
        pass
    return yaml.METHOD_NAME(stream, Loader=_SafeOrderedLoader)