code: def store_experts(
      experts: Dict[str, ModuleBackend], checkpoint_dir: Path
  ):
      logger.debug(f"Storing experts at {checkpoint_dir.absolute()}")
      assert is_directory(checkpoint_dir)
      timestamp = datetime.now().isoformat(sep="_")
      with TemporaryDirectory() as tmpdirname:
          for expert_name, expert_backend in experts.items():
              expert_dir = Path(tmpdirname) / expert_name
              expert_dir.mkdir()
              checkpoint_name = (
                  expert_dir / f"checkpoint_{timestamp}.pt"
              )
              torch.save(expert_backend.state_dict(), checkpoint_name)
              os.symlink(
                  checkpoint_name, expert_dir / "checkpoint_last.pt"
              )
          copy_tree(tmpdirname, str(checkpoint_dir))
  
file_path: hivemind/hivemind/moe/server/checkpoints.py
imports: import os
  import threading
  from datetime import datetime
  from pathlib import Path
  from shutil import copy2
  from tempfile import TemporaryDirectory
  from typing import Dict
  import torch
  from hivemind.moe.server.module_backend import ModuleBackend
  from hivemind.utils.logging import get_logger
label_desc: Use image node_id 3 for calling a global function with example usage: store_experts(experts, checkpoint_dir) without return types