code: def __setitem__(self, key: Key, value: object) -> None:
      try:
          pickled = self.dump(value)
      except Exception as e:
          # zict.LRU ensures that the key remains in fast if we raise.
          # Wrap the exception so that it's recognizable by SpillBuffer,
          # which will then unwrap it.
          raise PickleError(key) from e
  
      # Thanks to Buffer.__setitem__, we never update existing
      # keys in slow, but always delete them and reinsert them.
      assert key not in self.d
      assert key not in self.weight_by_key
  
      pickled_size = sum(map(nbytes, pickled))
  
      if (
          self.max_weight is not False
          and self.total_weight.disk + pickled_size > self.max_weight
      ):
          # Stop callbacks and ensure that the key ends up in SpillBuffer.fast
          # To be caught by SpillBuffer.__setitem__
          raise MaxSpillExceeded(key)
  
      # Store to disk through File.
      # This may raise OSError, which is caught by SpillBuffer above.
      with context_meter.meter("disk-write", "seconds"):
          self.d[key] = pickled
      context_meter.digest_metric("disk-write", 1, "count")
      context_meter.digest_metric("disk-write", pickled_size, "bytes")
  
      weight = SpilledSize(safe_sizeof(value), pickled_size)
      self.weight_by_key[key] = weight
      self.total_weight += weight
  
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 3 for calling the Slow obj's underlying member method code with example usage: obj.__setitem__(key, value) without return types