class_docstr: MutableMapping that automatically spills out dask key/value pairs to disk when
  the total size of the stored data exceeds the target. If max_spill is provided the
  key/value pairs won't be spilled once this threshold has been reached.
  
  Parameters
  ----------
  spill_directory: str
      Location on disk to write the spill files to
  target: int
      Managed memory, in bytes, to start spilling at
  max_spill: int | False, optional
      Limit of number of bytes to be spilled on disk. Set to False to disable.
class_docstr_tok: ["MutableMapping","that","automatically","spills","out","dask","key\/value","pairs","to","disk","when","the","total","size","of","the","stored","data","exceeds","the","target",".","If","max_spill","is","provided","the","key\/value","pairs","wo","n't","be","spilled","once","this","threshold","has","been","reached",".","Parameters","--","--","--","--","--","spill_directory",":","str","Location","on","disk","to","write","the","spill","files","to","target",":","int","Managed","memory",",","in","bytes",",","to","start","spilling","at","max_spill",":","int","|","False",",","optional","Limit","of","number","of","bytes","to","be","spilled","on","disk",".","Set","to","False","to","disable","."]
code: def __getitem__(self, key: Key) -> object:
      with self._capture_metrics():
          if key in self.fast:
              # Note: don't log from self.fast.__getitem__, because that's called
              # every time a key is evicted, and we don't want to count those events
              # here.
              memory_size = cast(int, self.fast.weights[key])
              # This is logged not only by the internal metrics callback but also by
              # those installed by gather_dep, get_data, and execute
              context_meter.digest_metric("memory-read", 1, "count")
              context_meter.digest_metric(
                  "memory-read", memory_size, "bytes"
              )
  
          return super().__getitem__(key)
  
imports: from __future__ import annotations
  import logging
  from collections import defaultdict
  from collections.abc import Callable, Hashable, Iterator, Mapping, MutableMapping, Sized
  from contextlib import contextmanager
  from functools import partial
  from typing import Literal, NamedTuple, Protocol, cast
  import zict
  from dask.typing import Key
  from distributed.metrics import context_meter
  from distributed.protocol import deserialize_bytes, serialize_bytelist
  from distributed.protocol.compression import get_compression_settings
  from distributed.sizeof import safe_sizeof
  from distributed.utils import RateLimiterFilter, nbytes
label_desc: Use image node_id 6 for calling the SpillBuffer obj's underlying member method code with example usage: obj.__getitem__(key) and returns: super