code: def _get_num_parallel_threads(max_threads, num_cores, mem_available_mb):
      '''
      Ensure at least ~1.2 GB memory per thread, see PTFM-18767
      '''
      return min(max_threads, num_cores, max(int(mem_available_mb/1200), 1)f _get_num_parallel_threads(max_threads, num_cores, mem_available_mb):
      '''
      Ensure at least ~1.2 GB memory per thread, see PTFM-18767
      '''
      return min(max_threads, num_cores, max(int(mem_available_mb/1200), 1))
docs: Ensure at least ~1.2 GB memory per thread, see PTFM-18767