class_docstr: Distributed Centralized Event equivalent to asyncio.Event
  
  An event stores a single flag, which is set to false on start.
  The flag can be set to true (using the set() call) or back to false
  (with the clear() call).
  Every call to wait() blocks until the event flag is set to true.
  
  Parameters
  ----------
  name: string (optional)
      Name of the event.  Choosing the same name allows two
      disconnected processes to coordinate an event.
      If not given, a random name will be generated.
  client: Client (optional)
      Client to use for communication with the scheduler.
      If not given, the default global client will be used.
  
  Examples
  --------
  >>> event_1 = Event('a')  # doctest: +SKIP
  >>> event_1.wait(timeout=1)  # doctest: +SKIP
  >>> # in another process
  >>> event_2 = Event('a')  # doctest: +SKIP
  >>> event_2.set() # doctest: +SKIP
  >>> # now event_1 will stop waiting
class_docstr_tok: ["Distributed","Centralized","Event","equivalent","to","asyncio.Event","An","event","stores","a","single","flag",",","which","is","set","to","false","on","start",".","The","flag","can","be","set","to","true","(","using","the","set","(",")","call",")","or","back","to","false","(","with","the","clear","(",")","call",")",".","Every","call","to","wait","(",")","blocks","until","the","event","flag","is","set","to","true",".","Parameters","--","--","--","--","--","name",":","string","(","optional",")","Name","of","the","event",".","Choosing","the","same","name","allows","two","disconnected","processes","to","coordinate","an","event",".","If","not","given",",","a","random","name","will","be","generated",".","client",":","Client","(","optional",")","Client","to","use","for","communication","with","the","scheduler",".","If","not","given",",","the","default","global","client","will","be","used",".","Examples","--","--","--","--",">",">",">","event_1","=","Event","(","'","a","'",")","#","doctest",":","+SKIP",">",">",">","event_1.wait","(","timeout=1",")","#","doctest",":","+SKIP",">",">",">","#","in","another","process",">",">",">","event_2","=","Event","(","'","a","'",")","#","doctest",":","+SKIP",">",">",">","event_2.set","(",")","#","doctest",":","+SKIP",">",">",">","#","now","event_1","will","stop","waiting"]
docstr: Set the event (set its flag to false).
  
  All waiters will now be released.
docstr_tok: ["Set","the","event","(","set","its","flag","to","false",")",".","All","waiters","will","now","be","released","."]
code: def set(self):
      """Set the event (set its flag to false).
  
      All waiters will now be released.
      """
      self._verify_running()
      result = self.client.sync(
          self.client.scheduler.event_set, name=self.name
      )
      return result
  
imports: from __future__ import annotations
  import asyncio
  import logging
  import uuid
  from collections import defaultdict
  from contextlib import suppress
  from dask.utils import parse_timedelta
  from distributed.utils import TimeoutError, log_errors, wait_for
  from distributed.worker import get_client
label_desc: Use image node_id 7 for calling the Event obj's underlying member method code with example usage: obj.set() and returns: result