code: def make_chunks(
      arguments: Sequence[str], nproc: int, maxbatch: int = 10
  ) -> list[Any]:
      # determine how many documents to read in one go
      nargs = len(arguments)
      chunksize = nargs // nproc
      if chunksize >= maxbatch:
          # try to improve batch size vs. number of batches
          chunksize = int(sqrt(nargs / nproc * maxbatch))
      if chunksize == 0:
          chunksize = 1
      nchunks, rest = divmod(nargs, chunksize)
      if rest:
          nchunks += 1
      # partition documents in "chunks" that will be written by one Process
      return [
          arguments[i * chunksize : (i + 1) * chunksize]
          for i in range(nchunks)
      ]
  
file_path: sphinx/sphinx/util/parallel.py
imports: from __future__ import annotations
  import os
  import time
  import traceback
  from math import sqrt
  from typing import TYPE_CHECKING, Any, Callable
  from sphinx.errors import SphinxParallelError
  from sphinx.util import logging
label_desc: Use image node_id 1 for calling a global function with example usage: make_chunks(arguments, nproc, maxbatch) and returns: unknown