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: Set the request document_array_cls.
  
  :param requests: the requests to execute
  :param exec_endpoint: the execution endpoint to use
  :param is_response: flag indicating if the schema needs to come from request or response
docstr_tok: ["Set","the","request","document_array_cls",".",":","param","requests",":","the","requests","to","execute",":","param","exec_endpoint",":","the","execution","endpoint","to","use",":","param","is_response",":","flag","indicating","if","the","schema","needs","to","come","from","request","or","response"]
code: def _setup_req_doc_array_cls(
      self, requests, exec_endpoint, is_response=False
  ):
      """Set the request document_array_cls.
  
      :param requests: the requests to execute
      :param exec_endpoint: the execution endpoint to use
      :param is_response: flag indicating if the schema needs to come from request or response
      """
      endpoint_info = self._executor.requests[exec_endpoint]
      for req in requests:
          try:
              if not docarray_v2:
                  req.document_array_cls = DocumentArray
              else:
                  if (
                      not endpoint_info.is_generator
                      and not endpoint_info.is_singleton_doc
                  ):
                      req.document_array_cls = (
                          endpoint_info.request_schema
                          if not is_response
                          else endpoint_info.response_schema
                      )
                  else:
                      req.document_array_cls = (
                          DocList[endpoint_info.request_schema]
                          if not is_response
                          else DocList[endpoint_info.response_schema]
                      )
          except AttributeError:
              pass
  
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 15 for calling the WorkerRequestHandler obj's underlying member method code with example usage: obj._setup_req_doc_array_cls(requests, exec_endpoint, is_response) without return types