code: def test_flow_with_external_deployment_join(
      external_deployment_join,
      external_deployment_join_args,
      input_docs,
      num_shards,
  ):
      with external_deployment_join:
          external_args = vars(external_deployment_join_args)
          del external_args["name"]
          del external_args["external"]
          del external_args["deployment_role"]
          flow = (
              Flow()
              .add(
                  **external_args,
                  external=True,
              )
              .add(
                  name="executor1",
                  needs=["executor0"],
              )
              .add(
                  name="executor2",
                  needs=["executor0"],
              )
              .needs(
                  **external_args,
                  external=True,
                  needs=["executor1", "executor2"],
              )
          )
          with flow:
              resp = flow.index(inputs=input_docs)
  
          # Reducing applied everywhere, expect 50 docs, same as the input
          validate_response(resp, len(input_docs))
  
imports: import uuid
  import pytest
  import jina.excepts
  from jina import Document, DocumentArray, Executor, Flow, requests
  from jina.helper import random_port
  from jina.orchestrate.deployments import Deployment
  from jina.parsers import set_deployment_parser
  from jina.serve.helper import get_server_side_grpc_options
label_desc: Use image node_id 19 for calling a global function with example usage: test_flow_with_external_deployment_join(external_deployment_join, external_deployment_join_args, input_docs, num_shards) without return types