class_docstr: Distributor Base Class that can handle all iterable items and calculate
  a map_function on each item separately.
  
  This is done on chunks of the data, meaning, that the DistributorBaseClass classes will chunk the data into chunks,
  distribute the data and apply the map_function functions on the items separately.
  
  Dependent on the implementation of the distribute function, this is done in parallel or using a cluster of nodes.
class_docstr_tok: ["Distributor","Base","Class","that","can","handle","all","iterable","items","and","calculate","a","map_function","on","each","item","separately",".","This","is","done","on","chunks","of","the","data",",","meaning",",","that","the","DistributorBaseClass","classes","will","chunk","the","data","into","chunks",",","distribute","the","data","and","apply","the","map_function","functions","on","the","items","separately",".","Dependent","on","the","implementation","of","the","distribute","function",",","this","is","done","in","parallel","or","using","a","cluster","of","nodes","."]
docstr: Calculates the best chunk size for a list of length data_length. The current implemented formula is more or
  less an empirical result for multiprocessing case on one machine.
  
  :param data_length: A length which defines how many calculations there need to be.
  :type data_length: int
  :return: the calculated chunk size
  :rtype: int
  
  TODO: Investigate which is the best chunk size for different settings.
docstr_tok: ["Calculates","the","best","chunk","size","for","a","list","of","length","data_length",".","The","current","implemented","formula","is","more","or","less","an","empirical","result","for","multiprocessing","case","on","one","machine",".",":","param","data_length",":","A","length","which","defines","how","many","calculations","there","need","to","be",".",":","type","data_length",":","int",":","return",":","the","calculated","chunk","size",":","rtype",":","int","TODO",":","Investigate","which","is","the","best","chunk","size","for","different","settings","."]
code: def calculate_best_chunk_size(self, data_length):
      """
      Calculates the best chunk size for a list of length data_length. The current implemented formula is more or
      less an empirical result for multiprocessing case on one machine.
  
      :param data_length: A length which defines how many calculations there need to be.
      :type data_length: int
      :return: the calculated chunk size
      :rtype: int
  
      TODO: Investigate which is the best chunk size for different settings.
      """
      chunk_size, extra = divmod(data_length, self.n_workers * 5)
      if extra:
          chunk_size += 1
      return chunk_size
  
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 3 for calling the IterableDistributorBaseClass obj's underlying member method code with example usage: obj.calculate_best_chunk_size(data_length) and returns: chunk_size