docstr: Parse yaml file using PyYAML library.
docstr_tok: ["Parse","yaml","file","using","PyYAML","library","."]
code: def _parse_yaml_file(self, config_file_path) -> None:
      """
      Parse yaml file using PyYAML library.
      """
      if not config_file_path:
          raise merrors.MetricsCacheTypeError(
              "Config file not initialized"
          )
  
      try:
          self._parsed_file = yaml.safe_load(
              open(config_file_path, "r", encoding="utf-8")
          )
          logging.info(f"Successfully loaded {config_file_path}.")
      except yaml.YAMLError as exc:
          raise merrors.MetricsCachePyYamlError(
              f"Error parsing file {config_file_path}: {exc}"
          )
      except IOError as io_err:
          raise merrors.MetricsCacheIOError(
              f"Error reading file {config_file_path}: {io_err}"
          )
      except Exception as err:
          raise merrors.GeneralMetricsCacheError(
              f"General error found in file {config_file_path}: {err}"
          )
  
file_path: serve/ts/metrics/metric_cache_yaml_impl.py
imports: import logging
  import yaml
  import ts.metrics.metric_cache_errors
  from ts.metrics.caching_metric import CachingMetric
  from ts.metrics.metric_cache_abstract import MetricCacheAbstract
  from ts.metrics.metric_type_enum import MetricTypes
label_desc: Use image node_id 2 for calling the MetricsCacheYamlImpl obj's underlying member method code with example usage: obj._parse_yaml_file(config_file_path) without return types