class_docstr: Stores the metric values computed during the evaluation.
docstr: Save the metrics stored in the MetricsResult to a json file.
  
  :param file: The file path or file name to save the data.
code: def save(self, file: Union[str, Path]):
      """
      Save the metrics stored in the MetricsResult to a json file.
  
      :param file: The file path or file name to save the data.
      """
      with open(file, "w") as outfile:
          json.dump(self, outfile, indent=4)
  
file_path: haystack/haystack/evaluation/metrics.py
imports: import json
  from enum import Enum
  from pathlib import Path
  from typing import Union
label_desc: Use image node_id 1 for calling the MetricsResult obj's underlying member method code with example usage: obj.save(file) without return types