code: def __init__(
      self,
      module_backends: Dict[str, ModuleBackend],
      checkpoint_dir: Path,
      update_period: float,
  ):
      super().__init__()
      assert is_directory(checkpoint_dir)
      self.module_backends = module_backends
      self.update_period = update_period
      self.checkpoint_dir = checkpoint_dir
      self.stop = threading.Event()
  
      # create expert directories to ensure that the directory is writable and checkpoints can be loaded
      store_experts(self.module_backends, self.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 1 to create a new CheckpointSaver object from inherited base classes: threading with example: obj = CheckpointSaver(module_backends, checkpoint_dir, update_period)