code: def _create_head_pod(
      port,
      connection_list_dict,
      name="",
      polling="ANY",
      uses_before=None,
      uses_after=None,
  ):
      args = _generate_pod_args()
      args.port = [port]
      args.name = name
      args.runtime_cls = "HeadRuntime"
      args.pod_role = PodRoleType.HEAD
      args.no_block_on_start = True
      args.polling = (
          PollingType.ANY if polling == "ANY" else PollingType.ALL
      )
      if uses_before:
          args.uses_before_address = uses_before
      if uses_after:
          args.uses_after_address = uses_after
      args.connection_list = json.dumps(connection_list_dict)
  
      return Pod(args)
  
imports: import asyncio
  import inspect
  import json
  import time
  from collections import defaultdict
  import pytest
  from jina import Client, Document, Executor, requests
  from jina.enums import PodRoleType, PollingType
  from jina.orchestrate.pods import Pod
  from jina.parsers import set_gateway_parser
  from jina.resources.health_check.gateway import check_health_http, check_health_websocket
  from jina.resources.health_check.pod import check_health_pod
  from jina.serve.networking.utils import send_request_sync
  from tests.helper import _generate_pod_args
label_desc: Use image node_id 3 for calling a global function with example usage: _create_head_pod(port, connection_list_dict, name, polling, uses_before, uses_after) and returns: Pod