code: def save_custom_metadata(
      path: str, custom_metadata: List[Tuple[str, Any]]
  ) -> None:
      """Saves custom metadata in a .json.
  
      Args:
          path:
              Filename of the .json file where the data should be stored.
          custom_metadata:
              List of tuples (filename, metadata) where metadata is a dictionary.
  
      :meta private:  # Skip docstring generation
      """
      formatted = format_custom_metadata(custom_metadata)
      with open(path, "w") as f:
          json.dump(formatted, f)
  
file_path: lightly/lightly/utils/io.py
imports: import csv
  import json
  import re
  from itertools import compress
  from typing import Any, Dict, List, Tuple, Union
  import numpy
  from numpy.typing import NDArray
label_desc: Use image node_id 6 for calling a global function with example usage: save_custom_metadata(path, custom_metadata) without return types