code: def test_user_config(serve_instance):
      @serve.deployment(
          "counter", num_replicas=2, user_config={"count": 123, "b": 2}
      )
      class Counter:
          def __init__(self):
              self.count = 10
  
          def __call__(self, *args):
              return self.count, os.getpid()
  
          def reconfigure(self, config):
              self.count = config["count"]
  
      handle = serve.run(Counter.bind()).options(
          use_new_handle_api=True,
      )
  
      def check(val, num_replicas):
          pids_seen = set()
          for i in range(100):
              result = handle.remote().result()
              if str(result[0]) != val:
                  return False
              pids_seen.add(result[1])
          return len(pids_seen) == num_replicas
  
      wait_for_condition(lambda: check("123", 2))
  
      Counter = Counter.options(num_replicas=3)
      serve.run(Counter.bind())
      wait_for_condition(lambda: check("123", 3))
  
      Counter = Counter.options(user_config={"count": 456})
      serve.run(Counter.bind())
      wait_for_condition(lambda: check("456", 3))
  
imports: import asyncio
  import os
  import sys
  from typing import Dict, Optional
  import pytest
  import requests
  import starlette.responses
  from fastapi import FastAPI
  import ray
  from ray import serve
  from ray._private.pydantic_compat import BaseModel, ValidationError
  from ray._private.test_utils import SignalActor, wait_for_condition
  from ray.serve._private.api import call_app_builder_with_args_if_necessary
  from ray.serve._private.common import DeploymentID
  from ray.serve._private.constants import SERVE_DEFAULT_APP_NAME
  from ray.serve.deployment import Application
  from ray.serve.exceptions import RayServeException
  from ray.serve.handle import DeploymentHandle, RayServeHandle
label_desc: Use image node_id 13 for calling a global function with example usage: test_user_config(serve_instance) and returns: unknown, self,  os, False