class_docstr: A WitlessRunner for git and git-annex commands.
  
  See GitRunnerBase it mixes in for more details
class_docstr_tok: ["A","WitlessRunner","for","git","and","git-annex","commands",".","See","GitRunnerBase","it","mixes","in","for","more","details"]
code: def _get_chunked_results(
      self,
      cmd,
      files,
      *,
      protocol=None,
      cwd=None,
      env=None,
      pathspec_from_file: Optional[bool] = False,
      **kwargs,
  ):
      assert isinstance(cmd, list)
  
      if self._CFG_PATHSPEC_FROM_FILE is None:
          from datalad import cfg  # avoid circular import
  
          GitWitlessRunner._CFG_PATHSPEC_FROM_FILE = cfg.obtain(
              "datalad.runtime.pathspec-from-file"
          )
          assert GitWitlessRunner._CFG_PATHSPEC_FROM_FILE in (
              "multi-chunk",
              "always",
          )
      file_chunks = list(generate_file_chunks(files, cmd))
  
      if pathspec_from_file and (
          len(file_chunks) > 1
          or GitWitlessRunner._CFG_PATHSPEC_FROM_FILE == "always"
      ):
          # if git supports pathspec---from-file and we need multiple chunks to do,
          # just use --pathspec-from-file
          with make_tempfile(
              content=b"\x00".join(f.encode() for f in files)
          ) as tf:
              cmd += [
                  "--pathspec-file-nul",
                  f"--pathspec-from-file={tf}",
              ]
              yield self.run(
                  cmd=cmd, protocol=protocol, cwd=cwd, env=env, **kwargs
              )
              return
  
      # "classical" chunking
      for i, file_chunk in enumerate(file_chunks):
          # do not pollute with message when there only ever is a single chunk
          if len(file_chunk) < len(files):
              lgr.debug(
                  "Process file list chunk %i (length %i)",
                  i,
                  len(file_chunk),
              )
  
          yield self.run(
              cmd=cmd + ["--"] + file_chunk,
              protocol=protocol,
              cwd=cwd,
              env=env,
              **kwargs,
          )
  
imports: import logging
  import os
  import os.path
  from typing import Optional
  from datalad.dochelpers import borrowdoc
  from datalad.utils import generate_file_chunks, make_tempfile
  from .runner import GeneratorMixIn, WitlessRunner
label_desc: Use image node_id 3 for calling the GitWitlessRunner obj's underlying member method code with example usage: obj._get_chunked_results(cmd, files) without return types