code: def test_training_data_as_yaml_dict():
      from collections import OrderedDict
  
      parser = RasaYAMLReader()
      writer = RasaYAMLWriter()
  
      training_data = parser.reads(
          """
  nlu:
  - intent: some_intent
    examples: |
      - an example
  responses:
    utter_something:
      - text: hello world
      """
      )
      structure = writer.training_data_to_dict(training_data)
  
      assert isinstance(structure, OrderedDict)
      assert "nlu" in structure
      assert "responses" in structure
  
imports: import textwrap
  import warnings
  from typing import Text
  import pytest
  import pathlib
  from rasa.shared.exceptions import YamlException, YamlSyntaxException
  import rasa.shared.utils.io
  from rasa.shared.constants import LATEST_TRAINING_DATA_FORMAT_VERSION
  from rasa.shared.nlu.constants import INTENT, METADATA, METADATA_INTENT, METADATA_EXAMPLE
  from rasa.shared.nlu.training_data.formats.rasa_yaml import RasaYAMLReader, RasaYAMLWriter
  from tests.conftest import filter_expected_warnings
label_desc: Use image node_id 8 for calling a global function with example usage: test_training_data_as_yaml_dict() without return types