class_docstr: Object to encapsulate the code related to handle the data requests passing to executor and its returned values
class_docstr_tok: ["Object","to","encapsulate","the","code","related","to","handle","the","data","requests","passing","to","executor","and","its","returned","values"]
docstr: Reduces a list of DocumentArrays into one DocumentArray. Changes are applied to the first
  DocumentArray in-place.
  
  Reduction consists in reducing every DocumentArray in `docs_matrix` sequentially using
  :class:`DocumentArray`.:method:`reduce`.
  The resulting DocumentArray contains Documents of all DocumentArrays.
  If a Document exists in many DocumentArrays, data properties are merged with priority to the left-most
  DocumentArrays (that is, if a data attribute is set in a Document belonging to many DocumentArrays, the
  attribute value of the left-most DocumentArray is kept).
  Matches and chunks of a Document belonging to many DocumentArrays are also reduced in the same way.
  Other non-data properties are ignored.
  
  .. note::
      - Matches are not kept in a sorted order when they are reduced. You might want to re-sort them in a later
          step.
      - The final result depends on the order of DocumentArrays when applying reduction.
  
  :param docs_matrix: List of DocumentArrays to be reduced
  :return: the resulting DocumentArray
docstr_tok: ["Reduces","a","list","of","DocumentArrays","into","one","DocumentArray",".","Changes","are","applied","to","the","first","DocumentArray","in-place",".","Reduction","consists","in","reducing","every","DocumentArray","in","`","docs_matrix","`","sequentially","using",":","class",":","`","DocumentArray","`",".",":","method",":","`","reduce","`",".","The","resulting","DocumentArray","contains","Documents","of","all","DocumentArrays",".","If","a","Document","exists","in","many","DocumentArrays",",","data","properties","are","merged","with","priority","to","the","left-most","DocumentArrays","(","that","is",",","if","a","data","attribute","is","set","in","a","Document","belonging","to","many","DocumentArrays",",","the","attribute","value","of","the","left-most","DocumentArray","is","kept",")",".","Matches","and","chunks","of","a","Document","belonging","to","many","DocumentArrays","are","also","reduced","in","the","same","way",".","Other","non-data","properties","are","ignored",".","..","note",":",":","-","Matches","are","not","kept","in","a","sorted","order","when","they","are","reduced",".","You","might","want","to","re-sort","them","in","a","later","step",".","-","The","final","result","depends","on","the","order","of","DocumentArrays","when","applying","reduction",".",":","param","docs_matrix",":","List","of","DocumentArrays","to","be","reduced",":","return",":","the","resulting","DocumentArray"]
code: def reduce(
      docs_matrix: List["DocumentArray"],
  ) -> Optional["DocumentArray"]:
      """
      Reduces a list of DocumentArrays into one DocumentArray. Changes are applied to the first
      DocumentArray in-place.
  
      Reduction consists in reducing every DocumentArray in `docs_matrix` sequentially using
      :class:`DocumentArray`.:method:`reduce`.
      The resulting DocumentArray contains Documents of all DocumentArrays.
      If a Document exists in many DocumentArrays, data properties are merged with priority to the left-most
      DocumentArrays (that is, if a data attribute is set in a Document belonging to many DocumentArrays, the
      attribute value of the left-most DocumentArray is kept).
      Matches and chunks of a Document belonging to many DocumentArrays are also reduced in the same way.
      Other non-data properties are ignored.
  
      .. note::
          - Matches are not kept in a sorted order when they are reduced. You might want to re-sort them in a later
              step.
          - The final result depends on the order of DocumentArrays when applying reduction.
  
      :param docs_matrix: List of DocumentArrays to be reduced
      :return: the resulting DocumentArray
      """
      if docs_matrix:
          if not docarray_v2:
              da = docs_matrix[0]
              da.reduce_all(docs_matrix[1:])
          else:
              from docarray.utils.reduce import reduce_all
  
              da = reduce_all(docs_matrix)
          return da
  
imports: import argparse
  import asyncio
  import functools
  import json
  import os
  import tempfile
  import threading
  import uuid
  import warnings
  from typing import TYPE_CHECKING, AsyncIterator, Dict, Generator, List, Optional, Tuple, Union
  from google.protobuf.struct_pb2 import Struct
  from jina._docarray import DocumentArray, docarray_v2
  from jina.constants import __default_endpoint__
  from jina.excepts import BadConfigSource, RuntimeTerminated
  from jina.helper import get_full_version
  from jina.importer import ImportExtensions
  from jina.proto import jina_pb2
  from jina.serve.executors import BaseExecutor
  from jina.serve.instrumentation import MetricsTimer
  from jina.serve.runtimes.worker.batch_queue import BatchQueue
  from jina.types.request.data import DataRequest, SingleDocumentRequest
label_desc: Use image node_id 23 for calling the WorkerRequestHandler obj's underlying member method code with example usage: obj.reduce(docs_matrix) and returns: da