class_docstr: Writes training data into a file in a YAML format.
class_docstr_tok: ["Writes","training","data","into","a","file","in","a","YAML","format","."]
docstr: Serializes the intents.
code: def process_intents(
      cls, training_data: "TrainingData"
  ) -> List[OrderedDict]:
      """Serializes the intents."""
      return RasaYAMLWriter.process_training_examples_by_key(
          cls.prepare_training_examples(training_data),
          KEY_INTENT,
          KEY_INTENT_EXAMPLES,
          TrainingDataWriter.generate_message,
      )
  
imports: import logging
  from collections import OrderedDict
  from pathlib import Path
  from typing import Text, Any, List, Dict, Tuple, Union, Iterator, Optional, Callable
  import rasa.shared.data
  from rasa.shared.core.domain import Domain
  from rasa.shared.exceptions import YamlException
  from rasa.shared.utils import validation
  from ruamel.yaml import StringIO
  from ruamel.yaml.scalarstring import LiteralScalarString
  from rasa.shared.constants import DOCS_URL_TRAINING_DATA, LATEST_TRAINING_DATA_FORMAT_VERSION
  from rasa.shared.nlu.constants import METADATA_INTENT, METADATA_EXAMPLE
  from rasa.shared.nlu.training_data.formats.readerwriter import TrainingDataReader, TrainingDataWriter
  import rasa.shared.utils.io
  import rasa.shared.nlu.training_data.util
  from rasa.shared.nlu.training_data.training_data import TrainingData
  from rasa.shared.nlu.training_data.message import Message
label_desc: Use image node_id 4 for calling the RasaYAMLWriter obj's underlying member method code with example usage: obj.process_intents(cls, training_data) and returns: RasaYAMLWriter