code: def call_api_with_params(req: RequestStructParams):
      c = Client(port=req.port)
      return c.post(
          req.endpoint,
          inputs=DocumentArray(
              [Document(text=str(i)) for i in req.iterator]
          ),
          parameters=req.params,
          stream=req.use_stream,
      )
  
imports: import asyncio
  import multiprocessing
  import multiprocessing
  import os
  import signal
  import time
  from collections import namedtuple
  import pytest
  from jina import Client, Document, DocumentArray, Executor, Flow, Deployment, dynamic_batching, requests
  from jina.clients.request import request_generator
  from jina.serve.networking.utils import send_request_sync
  from jina.serve.runtimes.servers import BaseServer
  from jina_cli.api import executor_native
  from jina.proto import jina_pb2
  from tests.helper import _generate_pod_args
label_desc: Use image node_id 2 for calling a global function with example usage: call_api_with_params(req) and returns: c