code: def _compute_executor_max_workers():
      # For processes, let's start conservative. Let's restrict to 4-18 always. Can be configurable one day.
      min_processes = 4
      max_processes = 18
      # make an effort to get cgroup cpu limits
      effective_cpu_limit = _determine_effective_cpu_limit()
  
      def _bracket(min_v, v, max_v):
          assert min_v <= max_v
          if v < min_v:
              return min_v
          if v > max_v:
              return max_v
          return v
  
      if effective_cpu_limit < 0:
          # We don't know the limit, stick to min
          processpool_max_workers = min_processes
      elif effective_cpu_limit == 0:
          # There is (probably) no limit, use physical core count
          processpool_max_workers = _bracket(
              min_processes, os.cpu_count() or 1, max_processes
          )
      else:
          # There is a limit, so let's bracket it within min / max
          processpool_max_workers = _bracket(
              min_processes,
              math.ceil(effective_cpu_limit),
              max_processes,
          )
      # Threads a lighter than processes... so just tack on a little more
      threadpool_max_workers = processpool_max_workers + 4
      return processpool_max_workers, threadpool_max_workers
  
file_path: metaflow/metaflow/plugins/storage_executor.py
imports: import math
  import multiprocessing
  import os
  import platform
  import sys
  from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor
  from metaflow.exception import MetaflowException
label_desc: Use image node_id 3 for calling a global function with example usage: _compute_executor_max_workers() and returns: processpool_max_workers,  threadpool_max_workers, v, min_v, max_v