class_docstr: A concurrent.futures Executor that executes tasks on a dask.distributed Client.
class_docstr_tok: ["A","concurrent.futures","Executor","that","executes","tasks","on","a","dask.distributed","Client","."]
code: def __init__(self, client, **kwargs):
      sk = set(kwargs)
      if not sk <= self._allowed_kwargs:
          raise TypeError(
              "unsupported arguments to ClientExecutor: %s"
              % sorted(sk - self._allowed_kwargs)
          )
      self._client = client
      self._futures = weakref.WeakSet()
      self._shutdown = False
      self._kwargs = kwargs
  
file_path: distributed/distributed/cfexecutor.py
imports: from __future__ import annotations
  import concurrent.futures
  import weakref
  from tlz import merge
  from tornado import gen
  from dask.utils import parse_timedelta
  from distributed.metrics import time
  from distributed.utils import TimeoutError, sync
label_desc: Use image node_id 1 to create a new ClientExecutor object from inherited base classes: cf with example: obj = ClientExecutor(client)