class_docstr: An in-process tf.data service dispatch server.
  
  A `tf.data.experimental.service.DispatchServer` coordinates a cluster of
  `tf.data.experimental.service.WorkerServer`s. When the workers start, they
  register themselves with the dispatcher.
  
  >>> dispatcher = tf.data.experimental.service.DispatchServer()
  >>> dispatcher_address = dispatcher.target.split("://")[1]
  >>> worker = tf.data.experimental.service.WorkerServer(
  ...     tf.data.experimental.service.WorkerConfig(
  ...     dispatcher_address=dispatcher_address))
  >>> dataset = tf.data.Dataset.range(10)
  >>> dataset = dataset.apply(tf.data.experimental.service.distribute(
  ...     processing_mode="parallel_epochs", service=dispatcher.target))
  >>> print(list(dataset.as_numpy_iterator()))
  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
  
  When starting a dedicated tf.data dispatch process, use join() to block
  after starting up the server, until the server terminates.
  
  ```
  dispatcher = tf.data.experimental.service.DispatchServer(
      tf.data.experimental.service.DispatcherConfig(port=5050))
  dispatcher.join()
  ```
  
  Call stop() to gracefully terminate the dispatcher. The server automatically
  stops when all reference to it have been deleted.
  
  To start a `DispatchServer` in fault-tolerant mode, set `work_dir` and
  `fault_tolerant_mode` like below:
  
  ```
  dispatcher = tf.data.experimental.service.DispatchServer(
      tf.data.experimental.service.DispatcherConfig(
          port=5050,
          work_dir="gs://my-bucket/dispatcher/work_dir",
          fault_tolerant_mode=True))
  ```
class_docstr_tok: ["An","in-process","tf.data","service","dispatch","server",".","A","`","tf.data.experimental.service.DispatchServer","`","coordinates","a","cluster","of","`","tf.data.experimental.service.WorkerServer","`","s",".","When","the","workers","start",",","they","register","themselves","with","the","dispatcher",".",">",">",">","dispatcher","=","tf.data.experimental.service.DispatchServer","(",")",">",">",">","dispatcher_address","=","dispatcher.target.split","(","``",":","\/\/","''",")","[","1","]",">",">",">","worker","=","tf.data.experimental.service.WorkerServer","(","...","tf.data.experimental.service.WorkerConfig","(","...","dispatcher_address=dispatcher_address",")",")",">",">",">","dataset","=","tf.data.Dataset.range","(","10",")",">",">",">","dataset","=","dataset.apply","(","tf.data.experimental.service.distribute","(","...","processing_mode=","''","parallel_epochs","''",",","service=dispatcher.target",")",")",">",">",">","print","(","list","(","dataset.as_numpy_iterator","(",")",")",")","[","0",",","1",",","2",",","3",",","4",",","5",",","6",",","7",",","8",",","9","]","When","starting","a","dedicated","tf.data","dispatch","process",",","use","join","(",")","to","block","after","starting","up","the","server",",","until","the","server","terminates",".","``","`","dispatcher","=","tf.data.experimental.service.DispatchServer","(","tf.data.experimental.service.DispatcherConfig","(","port=5050",")",")","dispatcher.join","(",")","``","`","Call","stop","(",")","to","gracefully","terminate","the","dispatcher",".","The","server","automatically","stops","when","all","reference","to","it","have","been","deleted",".","To","start","a","`","DispatchServer","`","in","fault-tolerant","mode",",","set","`","work_dir","`","and","`","fault_tolerant_mode","`","like","below",":","``","`","dispatcher","=","tf.data.experimental.service.DispatchServer","(","tf.data.experimental.service.DispatcherConfig","(","port=5050",",","work_dir=","''","gs",":","\/\/my-bucket\/dispatcher\/work_dir","''",",","fault_tolerant_mode=True",")",")","``","`"]
code: def __del__(self) -> None:
      self._stop()
  
imports: import collections
  from typing import Iterable
  from tensorflow.core.protobuf import service_config_pb2
  from tensorflow.python import pywrap_tensorflow
  from tensorflow.python.data.experimental.service import _pywrap_server_lib
  from tensorflow.python.data.experimental.service import _pywrap_utils
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 7 for calling the DispatchServer obj's underlying member method code with example usage: obj.__del__() without return types