code: def _chunksize(pool, iterable, chunksize):
      if chunksize is None:
          chunksize = 1
          num_workers = getattr(pool.executor, "_max_workers", 0)
          if num_workers > 0:  # pragma: no branch
              num_tasks = _operator.length_hint(iterable)
              if num_tasks == 0:
                  iterable = list(iterable)
                  num_tasks = len(iterable)
              if num_tasks > 0:
                  quot, rem = divmod(num_tasks, num_workers * 4)
                  chunksize = quot + bool(rem)
      return iterable, chunksize
  
imports: from os import cpu_count
  import functools
  import operator
  import threading
  import warnings
  import weakref
  from ..None import futures
label_desc: Use image node_id 1 for calling a global function with example usage: _chunksize(pool, iterable, chunksize) and returns: iterable,  chunksize