code: def save_schema(
      path: str, task_type: str, ids: List[int], names: List[str]
  ) -> None:
      """Saves a prediction schema in the right format.
  
      Args:
          path:
              Where to store the schema.
          task_type:
              Task type (e.g. classification, object-detection).
          ids:
              List of category ids.
          names:
              List of category names.
      """
      if len(ids) != len(names):
          raise ValueError("ids and names must have same length!")
  
      schema = {
          "task_type": task_type,
          "categories": [
              {"id": id, "name": name} for id, name in zip(ids, names)
          ],
      }
      with open(path, "w") as f:
          json.dump(schema, 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 8 for calling a global function with example usage: save_schema(path, task_type, ids, names) without return types