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: Load the executor to this runtime, specified by ``uses`` CLI argument.
  :param metrics_registry: Optional prometheus metrics registry that will be passed to the executor so that it can expose metrics
  :param tracer_provider: Optional tracer_provider that will be provided to the executor for tracing
  :param meter_provider: Optional meter_provider that will be provided to the executor for metrics
docstr_tok: ["Load","the","executor","to","this","runtime",",","specified","by","``","uses","``","CLI","argument",".",":","param","metrics_registry",":","Optional","prometheus","metrics","registry","that","will","be","passed","to","the","executor","so","that","it","can","expose","metrics",":","param","tracer_provider",":","Optional","tracer_provider","that","will","be","provided","to","the","executor","for","tracing",":","param","meter_provider",":","Optional","meter_provider","that","will","be","provided","to","the","executor","for","metrics"]
code: def _load_executor(
      self,
      metrics_registry: Optional["CollectorRegistry"] = None,
      tracer_provider: Optional["trace.TracerProvider"] = None,
      meter_provider: Optional["metrics.MeterProvider"] = None,
  ):
      """
      Load the executor to this runtime, specified by ``uses`` CLI argument.
      :param metrics_registry: Optional prometheus metrics registry that will be passed to the executor so that it can expose metrics
      :param tracer_provider: Optional tracer_provider that will be provided to the executor for tracing
      :param meter_provider: Optional meter_provider that will be provided to the executor for metrics
      """
      try:
          self._executor: BaseExecutor = BaseExecutor.load_config(
              self.args.uses,
              uses_with=self.args.uses_with,
              uses_metas=self.args.uses_metas,
              uses_requests=self.args.uses_requests,
              uses_dynamic_batching=self.args.uses_dynamic_batching,
              runtime_args={  # these are not parsed to the yaml config file but are pass directly during init
                  "workspace": self.args.workspace,
                  "shard_id": self.args.shard_id,
                  "shards": self.args.shards,
                  "replicas": self.args.replicas,
                  "name": self.args.name,
                  "provider": self.args.provider,
                  "metrics_registry": metrics_registry,
                  "tracer_provider": tracer_provider,
                  "meter_provider": meter_provider,
              },
              py_modules=self.args.py_modules,
              extra_search_paths=self.args.extra_search_paths,
          )
          self.logger.debug(f"{self._executor} is successfully loaded!")
  
      except BadConfigSource:
          self.logger.error(
              f"fail to load config from {self.args.uses}"
          )
          raise
      except FileNotFoundError:
          self.logger.error(f"fail to load file dependency")
          raise
      except Exception:
          self.logger.critical(
              f"can not load the executor from {self.args.uses}"
          )
          raise
  
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 7 for calling the WorkerRequestHandler obj's underlying member method code with example usage: obj._load_executor(metrics_registry, tracer_provider, meter_provider) without return types