code: def test_flow_with_external_deployment(
      external_deployment,
      external_deployment_args,
      input_docs,
      num_shards,
  ):
      with external_deployment:
          external_args = vars(external_deployment_args)
          del external_args["name"]
          del external_args["external"]
          del external_args["deployment_role"]
          flow = Flow().add(
              **external_args,
              name="external_fake",
              external=True,
          )
          with flow:
              resp = flow.index(inputs=input_docs)
  
          # expect 50 reduced Documents in total after sharding
          validate_response(resp, 50)
  
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 7 for calling a global function with example usage: test_flow_with_external_deployment(external_deployment, external_deployment_args, input_docs, num_shards) without return types