class_docstr: ``CheckpointContext`` gives access to checkpoint-related features of a Determined cluster.
class_docstr_tok: ["``","CheckpointContext","``","gives","access","to","checkpoint-related","features","of","a","Determined","cluster","."]
code: def _store_path_single(
      self, metadata: Optional[Dict[str, Any]] = None
  ) -> Iterator[Tuple[pathlib.Path, str]]:
      logger.debug(f"Getting path for storage (metadata={metadata})")
      if self._dist.rank != 0:
          raise RuntimeError(
              "cannot call CheckpointContext.store_path(shard=False) from non-chief worker "
              f"(rank={self._dist.rank})"
          )
  
      storage_id = str(uuid.uuid4())
      with self._storage_manager.store_path(storage_id) as path:
          yield path, storage_id
          self._write_metadata_file(os.fspath(path), metadata or {})
          resources = self._storage_manager._list_directory(path)
  
      self._report_checkpoint(storage_id, resources, metadata)
  
imports: import contextlib
  import datetime
  import enum
  import hashlib
  import json
  import logging
  import os
  import pathlib
  import uuid
  from typing import Any, Callable, Dict, Iterator, List, Optional, Set, Tuple, Union
  from determined import core, tensorboard
  from determined.common import api, storage
  from determined.common.api import bindings
label_desc: Use image node_id 10 for calling the CheckpointContext obj's underlying member method code with example usage: obj._store_path_single(metadata) without return types