class_docstr: Kill Workers Randomly
  
  This kills workers in a cluster randomly.  It is intended to be used in
  stress testing.
  
  Parameters
  ----------
  delay: str
      The expected amount of time for a worker to live.
      The actual time will vary, treating worker death as a poisson process.
  mode: str
      or "graceful" which calls worker.close(...)
      Either "sys.exit" which calls sys.exit(0)
      or "segfault" which triggers a segfault
docstr: Magic, from https://gist.github.com/coolreader18/6dbe0be2ae2192e90e1a809f1624c694?permalink_comment_id=3874116#gistcomment-3874116
docstr_tok: ["Magic",",","from","https",":","\/\/gist.github.com\/coolreader18\/6dbe0be2ae2192e90e1a809f1624c694","?","permalink_comment_id=3874116","#","gistcomment-3874116"]
code: def segfault(self):
      """
      Magic, from https://gist.github.com/coolreader18/6dbe0be2ae2192e90e1a809f1624c694?permalink_comment_id=3874116#gistcomment-3874116
      """
      ctypes.string_at(0)
  
file_path: distributed/distributed/chaos.py
imports: from __future__ import annotations
  import asyncio
  import ctypes
  import random
  import sys
  from typing import Literal
  from dask.utils import parse_timedelta
  from distributed.diagnostics.plugin import WorkerPlugin
label_desc: Use image node_id 4 for calling the KillWorker obj's underlying member method code with example usage: obj.segfault() without return types