code: def test_deployment_to_schema_to_deployment():
      @serve.deployment(
          num_replicas=3,
          route_prefix="/hello",
          ray_actor_options={
              "runtime_env": {
                  "working_dir": TEST_MODULE_PINNED_URI,
                  "py_modules": [TEST_DEPLOY_GROUP_PINNED_URI],
              }
          },
      )
      def f():
          # The body of this function doesn't matter. It gets replaced by
          # global_f() when the import path in f._func_or_class is overwritten.
          # This function is used as a convenience to apply the @serve.deployment
          # decorator without converting global_f() into a Deployment object.
          pass
  
      deployment = schema_to_deployment(deployment_to_schema(f))
      deployment.set_options(
          func_or_class="ray.serve.tests.test_schema.global_f"
      )
  
      assert deployment.num_replicas == 3
      assert deployment.route_prefix == "/hello"
      assert (
          deployment.ray_actor_options["runtime_env"]["working_dir"]
          == TEST_MODULE_PINNED_URI
      )
      assert deployment.ray_actor_options["runtime_env"][
          "py_modules"
      ] == [
          TEST_DEPLOY_GROUP_PINNED_URI,
          TEST_MODULE_PINNED_URI,
      ]
  
imports: import copy
  import json
  import logging
  import sys
  from typing import Dict, List, Optional, Union
  import pytest
  from ray import serve
  from ray._private.pydantic_compat import ValidationError
  from ray.serve.config import AutoscalingConfig
  from ray.serve.deployment import deployment_to_schema, schema_to_deployment
  from ray.serve.schema import DeploymentSchema, LoggingConfig, RayActorOptionsSchema, ServeApplicationSchema, ServeDeploySchema, ServeInstanceDetails
  from ray.serve.tests.common.remote_uris import TEST_DEPLOY_GROUP_PINNED_URI, TEST_MODULE_PINNED_URI
  from ray.util.accelerators.accelerators import NVIDIA_TESLA_P4, NVIDIA_TESLA_V100
label_desc: Use image node_id 6 for calling a global function with example usage: test_deployment_to_schema_to_deployment() without return types