code: def _prepare_context(self, data: typing.Mapping) -> List[object]:
      lines: List[object] = []
      for index, error in enumerate(self.exc.errors):
          if index and lines[-1]:
              lines.append("")
          line, col, step = determine_linecol(data, error.path)
          parts = [error.error_message]
          if error.path:
              parts.append(
                  "in " + " -> ".join(str(p) for p in error.path)
              )
          if line:
              parts.append(f"line {line}")
          if col:
              parts.append(f"column {col}")
          lines.append(_prepare_cause(", ".join(parts)))
  
          if line:
              # we show one line above the error
              # we try to show few more lines if we could not
              # reliably figure out where the error was
              lr = (line - 1, line + step - 1)
              code = _prepare_code_snippets(self.text, line_range=lr)
              lines.append(code)
      return lines
  
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 2 for calling the YAMLValidationError obj's underlying member method code with example usage: obj._prepare_context(data) and returns: lines