class_docstr: Cache the distillation labels on disk.
  Under each label will be saved as a file named `{uid}.pkl` under `cache_folder`.
class_docstr_tok: ["Cache","the","distillation","labels","on","disk",".","Under","each","label","will","be","saved","as","a","file","named","`","{","uid","}",".pkl","`","under","`","cache_folder","`","."]
code: def from_checkpoint(
      cls,
      checkpoint_folder: str | PathLike,
      cache_folder: str | PathLike | None = None,
  ):
      # Note: be careful, if path and cache_folder is the same or cache_folder is None, it will in-place update.
      root_path = Path(checkpoint_folder).absolute()
      assert root_path.exists()
      cache_folder = cache_folder if cache_folder else root_path
  
      storage = cls(cache_folder=cache_folder)
      # load uid2filename dict
      with Path(root_path / SETTING_FILENAME).open(mode="r") as f:
          uid2filename = json_tricks.load(f)
          storage._uid2filename.update(uid2filename)
      if root_path != storage._cache_folder:
          shutil.copytree(
              root_path,
              storage._cache_folder,
              copy_function=shutil.copy2,
              dirs_exist_ok=True,
          )
      return storage
  
imports: from __future__ import annotations
  import logging
  import os
  from os import PathLike
  from pathlib import Path
  import shutil
  import tempfile
  from typing import Any, Dict, List, Literal
  import json_tricks
  from .utils import pickle_dump, pickle_load
label_desc: Use image node_id 9 for calling the FileStorage obj's underlying member method code with example usage: obj.from_checkpoint(cls, checkpoint_folder, cache_folder) and returns: storage