class_docstr: Cache the distillation labels in memory.
class_docstr_tok: ["Cache","the","distillation","labels","in","memory","."]
code: def from_checkpoint(cls, checkpoint_folder: str | PathLike):
      root_path = Path(checkpoint_folder).absolute()
      assert root_path.exists()
      # load uid2filename dict
      with Path(root_path / SETTING_FILENAME).open(mode="r") as f:
          uid2filename = json_tricks.load(f)
      # load data
      uid2data = {}
      for uid, filename in uid2filename.items():
          uid2data[uid] = pickle_load(root_path / "data" / filename)
  
      storage = cls()
      storage._uid2data.update(uid2data)
      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 7 for calling the MemoryStorage obj's underlying member method code with example usage: obj.from_checkpoint(cls, checkpoint_folder) and returns: storage