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","."]
docstr: Submits a callable to be executed with the given arguments.
  
  Schedules the callable to be executed as ``fn(*args, **kwargs)``
  and returns a Future instance representing the execution of the callable.
  
  Returns
  -------
  A Future representing the given call.
docstr_tok: ["Submits","a","callable","to","be","executed","with","the","given","arguments",".","Schedules","the","callable","to","be","executed","as","``","fn","(","*","args",",","*","*","kwargs",")","``","and","returns","a","Future","instance","representing","the","execution","of","the","callable",".","Returns","--","--","--","-","A","Future","representing","the","given","call","."]
code: def submit(self, fn, *args, **kwargs):
      """Submits a callable to be executed with the given arguments.
  
      Schedules the callable to be executed as ``fn(*args, **kwargs)``
      and returns a Future instance representing the execution of the callable.
  
      Returns
      -------
      A Future representing the given call.
      """
      if self._shutdown:
          raise RuntimeError(
              "cannot schedule new futures after shutdown"
          )
      future = self._client.submit(
          fn, *args, **merge(self._kwargs, kwargs)
      )
      self._futures.add(future)
      return self._wrap_future(future)
  
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 3 for calling the ClientExecutor obj's underlying member method code with example usage: obj.submit(fn) and returns: self