code: def test_deployment_shards_replicas(shards, replicas):
      class PIDExecutor(Executor):
          @requests
          def foo(self, docs, **kwargs):
              import os
  
              for doc in docs:
                  doc.tags["pid"] = os.getpid()
  
      dep = Deployment(
          uses=PIDExecutor, shards=shards, replicas=replicas
      )
  
      with dep:
          docs = dep.post(
              on="/", inputs=DocumentArray.empty(20), request_size=1
          )
  
      returned_pids = set([doc.tags["pid"] for doc in docs])
      assert len(returned_pids) == shards * replicas
  
imports: import asyncio
  import json
  import time
  import pytest
  from docarray import Document, DocumentArray
  from pytest import FixtureRequest
  from jina import Client, Document, Executor, requests
  from jina.enums import PollingType
  from jina.helper import random_port
  from jina.orchestrate.deployments import Deployment
  from jina.parsers import set_deployment_parser, set_gateway_parser
label_desc: Use image node_id 10 for calling a global function with example usage: test_deployment_shards_replicas(shards, replicas) without return types