code: def test_parameters_as_pydantic_in_flow_second(protocol):
      class Input1(BaseDoc):
          text: str
  
      class Output1(BaseDoc):
          price: int
  
      class Output2(BaseDoc):
          a: str
  
      class ParametersSecond(BaseModel):
          mult: int
  
      class Exec1Chain(Executor):
          @requests(on="/bar")
          def bar(
              self, docs: DocList[Input1], **kwargs
          ) -> DocList[Output1]:
              docs_return = DocList[Output1](
                  [Output1(price=5) for _ in range(len(docs))]
              )
              return docs_return
  
      class Exec2Chain(Executor):
          @requests(on="/bar")
          def bar(
              self,
              docs: DocList[Output1],
              parameters: ParametersSecond,
              **kwargs,
          ) -> DocList[Output2]:
              docs_return = DocList[Output2](
                  [
                      Output2(
                          a=f"final price {docs[0].price * parameters.mult}"
                      )
                      for _ in range(len(docs))
                  ]
              )
              return docs_return
  
      f = (
          Flow(protocol=protocol)
          .add(uses=Exec1Chain)
          .add(uses=Exec2Chain)
      )
      with f:
          docs = f.post(
              on="/bar",
              inputs=Input1(text="ignored"),
              parameters={"mult": 10},
              return_type=DocList[Output2],
          )
          assert docs[0].a == "final price 50"
  
file_path: jina/tests/integration/docarray_v2/test_parameters_as_pydantic.py
imports: from typing import Dict
  import pytest
  from docarray import BaseDoc, DocList
  from docarray.documents import TextDoc
  from pydantic import BaseModel
  from jina import Deployment, Executor, Flow, requests
  from jina.helper import random_port
label_desc: Use image node_id 4 for calling a global function with example usage: test_parameters_as_pydantic_in_flow_second(protocol) and returns: docs_return, docs_return