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"]
docstr: Run a git-style command multiple times if `files` is too long,
  using a non-generator protocol, i.e. a protocol that is not
  derived from `datalad.runner.protocol.GeneratorMixIn`.
  
  Parameters
  ----------
  cmd : list
    Sequence of program arguments.
  files : list
    List of files.
  protocol : WitlessProtocol, optional
    Protocol class handling interaction with the running process
    (e.g. output capture). A number of pre-crafted classes are
    provided (e.g `KillOutput`, `NoCapture`, `GitProgress`).
  cwd : path-like, optional
    If given, commands are executed with this path as PWD,
    the PWD of the parent process is used otherwise. Overrides
    any `cwd` given to the constructor.
  env : dict, optional
    Environment to be used for command execution. If `cwd`
    was given, 'PWD' in the environment is set to its value.
    This must be a complete environment definition, no values
    from the current environment will be inherited. Overrides
    any `env` given to the constructor.
  pathspec_from_file : bool, optional
    Could be set to True for a `git` command which supports
    --pathspec-from-file and --pathspec-file-nul options. Then pathspecs
    would be passed through a temporary file.
  kwargs :
    Passed to the Protocol class constructor.
  
  Returns
  -------
  dict
    At minimum there will be keys 'stdout', 'stderr' with
    unicode strings of the cumulative standard output and error
    of the process as values.
  
  Raises
  ------
  CommandError
    On execution failure (non-zero exit code) this exception is
    raised which provides the command (cmd), stdout, stderr,
    exit code (status), and a message identifying the failed
    command, as properties.
  FileNotFoundError
    When a given executable does not exist.
docstr_tok: ["Run","a","git-style","command","multiple","times","if","`","files","`","is","too","long",",","using","a","non-generator","protocol",",","i.e",".","a","protocol","that","is","not","derived","from","`","datalad.runner.protocol.GeneratorMixIn","`",".","Parameters","--","--","--","--","--","cmd",":","list","Sequence","of","program","arguments",".","files",":","list","List","of","files",".","protocol",":","WitlessProtocol",",","optional","Protocol","class","handling","interaction","with","the","running","process","(","e.g",".","output","capture",")",".","A","number","of","pre-crafted","classes","are","provided","(","e.g","`","KillOutput","`",",","`","NoCapture","`",",","`","GitProgress","`",")",".","cwd",":","path-like",",","optional","If","given",",","commands","are","executed","with","this","path","as","PWD",",","the","PWD","of","the","parent","process","is","used","otherwise",".","Overrides","any","`","cwd","`","given","to","the","constructor",".","env",":","dict",",","optional","Environment","to","be","used","for","command","execution",".","If","`","cwd","`","was","given",",","'PWD","'","in","the","environment","is","set","to","its","value",".","This","must","be","a","complete","environment","definition",",","no","values","from","the","current","environment","will","be","inherited",".","Overrides","any","`","env","`","given","to","the","constructor",".","pathspec_from_file",":","bool",",","optional","Could","be","set","to","True","for","a","`","git","`","command","which","supports","--","pathspec-from-file","and","--","pathspec-file-nul","options",".","Then","pathspecs","would","be","passed","through","a","temporary","file",".","kwargs",":","Passed","to","the","Protocol","class","constructor",".","Returns","--","--","--","-","dict","At","minimum","there","will","be","keys","'stdout","'",",","'stderr","'","with","unicode","strings","of","the","cumulative","standard","output","and","error","of","the","process","as","values",".","Raises","--","--","--","CommandError","On","execution","failure","(","non-zero","exit","code",")","this","exception","is","raised","which","provides","the","command","(","cmd",")",",","stdout",",","stderr",",","exit","code","(","status",")",",","and","a","message","identifying","the","failed","command",",","as","properties",".","FileNotFoundError","When","a","given","executable","does","not","exist","."]
code: def run_on_filelist_chunks(
      self,
      cmd,
      files,
      *,
      protocol=None,
      cwd=None,
      env=None,
      pathspec_from_file: Optional[bool] = False,
      **kwargs,
  ):
      """
      Run a git-style command multiple times if `files` is too long,
      using a non-generator protocol, i.e. a protocol that is not
      derived from `datalad.runner.protocol.GeneratorMixIn`.
  
      Parameters
      ----------
      cmd : list
        Sequence of program arguments.
      files : list
        List of files.
      protocol : WitlessProtocol, optional
        Protocol class handling interaction with the running process
        (e.g. output capture). A number of pre-crafted classes are
        provided (e.g `KillOutput`, `NoCapture`, `GitProgress`).
      cwd : path-like, optional
        If given, commands are executed with this path as PWD,
        the PWD of the parent process is used otherwise. Overrides
        any `cwd` given to the constructor.
      env : dict, optional
        Environment to be used for command execution. If `cwd`
        was given, 'PWD' in the environment is set to its value.
        This must be a complete environment definition, no values
        from the current environment will be inherited. Overrides
        any `env` given to the constructor.
      pathspec_from_file : bool, optional
        Could be set to True for a `git` command which supports
        --pathspec-from-file and --pathspec-file-nul options. Then pathspecs
        would be passed through a temporary file.
      kwargs :
        Passed to the Protocol class constructor.
  
      Returns
      -------
      dict
        At minimum there will be keys 'stdout', 'stderr' with
        unicode strings of the cumulative standard output and error
        of the process as values.
  
      Raises
      ------
      CommandError
        On execution failure (non-zero exit code) this exception is
        raised which provides the command (cmd), stdout, stderr,
        exit code (status), and a message identifying the failed
        command, as properties.
      FileNotFoundError
        When a given executable does not exist.
      """
  
      assert not issubclass(protocol, GeneratorMixIn), (
          "cannot use GitWitlessRunner.run_on_filelist_chunks() "
          "with a protocol that inherits GeneratorMixIn, use "
          "GitWitlessRunner.run_on_filelist_chunks_items_() instead"
      )
  
      results = None
      for res in self._get_chunked_results(
          cmd=cmd,
          files=files,
          protocol=protocol,
          cwd=cwd,
          env=env,
          pathspec_from_file=pathspec_from_file,
          **kwargs,
      ):
          if results is None:
              results = res
          else:
              for k, v in res.items():
                  results[k] += v
      return results
  
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 4 for calling the GitWitlessRunner obj's underlying member method code with example usage: obj.run_on_filelist_chunks(cmd, files) and returns: results