code: def parse_yaml_for_update(text, path):
      """Parses text into Python structure.
  
      Unlike `parse_yaml()` this returns ordered dicts, values have special
      attributes to store comments and line breaks. This allows us to preserve
      all of those upon dump.
  
      This one is, however, several times slower than simple `parse_yaml()`.
      """
      return parse_yaml(text, path, typ="rt")
  
file_path: dvc/dvc/utils/serialize/_yaml.py
imports: import io
  from collections import OrderedDict
  from contextlib import contextmanager
  from typing import Any, TextIO
  from funcy import reraise
  from ._common import ParseError, _dump_data, _load_data, _modify_data
label_desc: Use image node_id 3 for calling a global function with example usage: parse_yaml_for_update(text, path) and returns: parse_yaml