class_docstr: Distributor using a local dask cluster and inproc communication.
class_docstr_tok: ["Distributor","using","a","local","dask","cluster","and","inproc","communication","."]
docstr: Initiates a LocalDaskDistributor instance.
  
  :param n_workers: How many workers should the local dask cluster have?
  :type n_workers: int
docstr_tok: ["Initiates","a","LocalDaskDistributor","instance",".",":","param","n_workers",":","How","many","workers","should","the","local","dask","cluster","have","?",":","type","n_workers",":","int"]
code: def __init__(self, n_workers):
      """
  
      Initiates a LocalDaskDistributor instance.
  
      :param n_workers: How many workers should the local dask cluster have?
      :type n_workers: int
      """
  
      import tempfile
  
      from distributed import Client, LocalCluster
  
      # attribute .local_dir_ is the path where the local dask workers store temporary files
      self.local_dir_ = tempfile.mkdtemp()
      cluster = LocalCluster(
          n_workers=n_workers,
          processes=False,
          local_directory=self.local_dir_,
      )
  
      self.client = Client(cluster)
      self.n_workers = n_workers
  
imports: import itertools
  import math
  import warnings
  from collections.abc import Generator, Iterable
  from functools import partial
  from itertools import islice, repeat, takewhile
  from multiprocessing import Pool
  from tqdm import tqdm
  from tsfresh.feature_extraction.data import TsData
label_desc: Use image node_id 1 to create a new LocalDaskDistributor object from inherited base classes: IterableDistributorBaseClass with example: obj = LocalDaskDistributor(n_workers)