code: def load(
      path: str,
      schema: Optional[Callable[[_T], _T]] = None,
      fs: Optional["FileSystem"] = None,
      encoding: str = "utf-8",
      round_trip: bool = False,
  ) -> Any:
      open_fn = fs.open if fs else open
      rev = getattr(fs, "rev", None)
  
      try:
          with open_fn(path, encoding=encoding) as fd:  # type: ignore[operator]
              text = fd.read()
          data = parse_yaml(
              text, path, typ="rt" if round_trip else "safe"
          )
      except UnicodeDecodeError as exc:
          raise EncodingError(path, encoding) from exc
      except YAMLFileCorruptedError as exc:
          cause = exc.__cause__
          raise YAMLSyntaxError(path, text, exc, rev=rev) from cause
  
      if schema:
          # not returning validated data, as it may remove
          # details from CommentedMap that we get from roundtrip parser
          validate(data, schema, text=text, path=path, rev=rev)
      return data, text
  
imports: import re
  import typing
  from contextlib import suppress
  from typing import TYPE_CHECKING, Any, Callable, List, Optional, Tuple, TypeVar
  from dvc.exceptions import PrettyDvcException
  from dvc.ui import ui
  from dvc.utils.serialize import EncodingError, YAMLFileCorruptedError, parse_yaml, parse_yaml_for_update
label_desc: Use image node_id 7 for calling a global function with example usage: load(path, schema, fs, encoding, round_trip) and returns: data,  text