code: def read_yaml(
      content: Text, reader_type: Union[Text, List[Text]] = "safe"
  ) -> Any:
      """Parses yaml from a text.
  
      Args:
          content: A text containing yaml content.
          reader_type: Reader type to use. By default "safe" will be used.
  
      Raises:
          ruamel.yaml.parser.ParserError: If there was an error when parsing the YAML.
      """
      if _is_ascii(content):
          # Required to make sure emojis are correctly parsed
          content = (
              content.encode("utf-8")
              .decode("raw_unicode_escape")
              .encode("utf-16", "surrogatepass")
              .decode("utf-16")
          )
  
      yaml_parser = yaml.YAML(typ=reader_type)
      yaml_parser.version = YAML_VERSION  # type: ignore[assignment]
      yaml_parser.preserve_quotes = True  # type: ignore[assignment]
  
      return yaml_parser.load(content) or {}
  
imports: from collections import OrderedDict
  import errno
  import glob
  from hashlib import md5
  from io import StringIO
  import json
  import os
  import sys
  from pathlib import Path
  import re
  from typing import Any, Dict, List, Optional, Text, Type, Union
  import warnings
  import random
  import string
  import portalocker
  from ruamel import yaml
  from ruamel.yaml import RoundTripRepresenter, YAMLError
  from ruamel.yaml.constructor import DuplicateKeyError, BaseConstructor, ScalarNode
  from rasa.shared.constants import DEFAULT_LOG_LEVEL, ENV_LOG_LEVEL, NEXT_MAJOR_VERSION_FOR_DEPRECATIONS, CONFIG_SCHEMA_FILE, MODEL_CONFIG_SCHEMA_FILE
  from rasa.shared.exceptions import FileIOException, FileNotFoundException, YamlSyntaxException, RasaException
  import rasa.shared.utils.validation
label_desc: Use image node_id 17 for calling a global function with example usage: read_yaml(content, reader_type) and returns: unknown