code: def parse(fs, path, props=None, **fs_kwargs):
      props = props or {}
      _, extension = os.path.splitext(path)
      if extension in SUPPORTED_IMAGE_EXTENSIONS:
          with fs.open(path, mode="rb", **fs_kwargs) as fd:
              return fd.read()
  
      if extension not in PARSERS.keys() | {
          ".yml",
          ".yaml",
          ".csv",
          ".tsv",
      }:
          raise PlotMetricTypeError(path)
  
      with reraise(UnicodeDecodeError, EncodingError(path, "utf8")):
          with fs.open(
              path, mode="r", encoding="utf8", **fs_kwargs
          ) as fd:
              contents = fd.read()
  
      if extension in (".csv", ".tsv"):
          header = props.get("header", True)
          delim = "\t" if extension == ".tsv" else ","
          return _load_sv(contents, delimiter=delim, header=header)
      return PARSERS[extension](contents, path)
  
imports: import csv
  import io
  import os
  from collections import defaultdict
  from copy import deepcopy
  from functools import partial
  from multiprocessing import cpu_count
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterator, List, Optional, Set, Union
  import dpath
  import dpath.options
  from funcy import first, ldistinct, project, reraise
  from dvc.exceptions import DvcException
  from dvc.log import logger
  from dvc.utils import error_handler, errored_revisions
  from dvc.utils.objects import cached_property
  from dvc.utils.serialize import PARSERS, EncodingError
  from dvc.utils.threadpool import ThreadPoolExecutor
  from dvc_render.image import ImageRenderer
label_desc: Use image node_id 18 for calling a global function with example usage: parse(fs, path, props) and returns: PARSERS, _load_sv, fd