class_docstr: Class that handles the requests arriving to the head and the results extracted from the requests future.
  
  :param metrics_registry: optional metrics registry for prometheus. Used if we need to expose metrics from the executor or from the data request handler
  :param runtime_name: optional runtime_name that will be registered during monitoring
code: def _default_polling_dict(self, default_polling):
      return defaultdict(
          lambda: default_polling,
          {"/search": PollingType.ALL, "/index": PollingType.ANY},
      )
  
imports: import argparse
  import asyncio
  import json
  import os
  from collections import defaultdict
  from typing import TYPE_CHECKING, AsyncIterator, Dict, List, Optional, Tuple, Any
  import grpc
  from jina.enums import PollingType
  from jina.constants import __default_endpoint__
  from jina.excepts import InternalNetworkError
  from jina.helper import get_full_version
  from jina.proto import jina_pb2
  from jina.serve.networking import GrpcConnectionPool
  from jina.serve.runtimes.monitoring import MonitoringRequestMixin
  from jina.serve.runtimes.worker.request_handling import WorkerRequestHandler
  from jina.types.request.data import DataRequest, Response
  from jina._docarray import docarray_v2
label_desc: Use image node_id 2 for calling the HeaderRequestHandler obj's underlying member method code with example usage: obj._default_polling_dict(default_polling) and returns: defaultdict