docstr: If no prefix is given, use runtime context job ID.
docstr_tok: ["If","no","prefix","is","given",",","use","runtime","context","job","ID","."]
code: def __init__(self, prefix: Optional[str] = None):
      """If no prefix is given, use runtime context job ID."""
      self._to_flush = {}
      self._prefix = prefix
      self._registered = set()
      self._atexit_handler_registered = False
  
imports: import atexit
  import logging
  from functools import partial
  from types import FunctionType
  from typing import Callable, Optional, Type, Union
  import ray
  import ray.cloudpickle
  from ray.experimental.internal_kv import _internal_kv_get, _internal_kv_initialized, _internal_kv_put, _internal_kv_del
  from ray.tune.error import TuneError
  from ray.util.annotations import DeveloperAPI
label_desc: Use image node_id 1 to create a new _Registry object  with example: obj = _Registry(prefix)