class_docstr: Config for where to run proxies to receive ingress traffic to the cluster.
  
  Options:
  
      - Disabled: don't run proxies at all. This should be used if you are only
        making calls to your applications via deployment handles.
      - HeadOnly: only run a single proxy on the head node.
      - EveryNode: run a proxy on every node in the cluster that has at least one
        replica actor. This is the default.
code: def _to_deployment_mode(
      cls, proxy_location: Union["ProxyLocation", str]
  ) -> DeploymentMode:
      if isinstance(proxy_location, str):
          proxy_location = ProxyLocation(proxy_location)
      elif not isinstance(proxy_location, ProxyLocation):
          raise TypeError(
              f"Must be a `ProxyLocation` or str, got: {type(proxy_location)}."
          )
  
      if proxy_location == ProxyLocation.Disabled:
          return DeploymentMode.NoServer
      else:
          return DeploymentMode(proxy_location.value)
  
imports: import logging
  import warnings
  from enum import Enum
  from typing import Any, Callable, List, Optional, Union
  from ray import cloudpickle
  from ray._private.pydantic_compat import BaseModel, NonNegativeFloat, NonNegativeInt, PositiveFloat, PositiveInt, validator
  from ray._private.utils import import_attr
  from ray.serve._private.constants import DEFAULT_AUTOSCALING_POLICY, DEFAULT_GRPC_PORT, DEFAULT_HTTP_HOST, DEFAULT_HTTP_PORT, DEFAULT_UVICORN_KEEP_ALIVE_TIMEOUT_S, SERVE_LOGGER_NAME
  from ray.util.annotations import Deprecated, PublicAPI
label_desc: Use image node_id 1 for calling the ProxyLocation obj's underlying member method code with example usage: obj._to_deployment_mode(cls, proxy_location) and returns: DeploymentMode, DeploymentMode