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.
docstr: Converts DeploymentMode enum into ProxyLocation enum.
  
  DeploymentMode is a deprecated version of ProxyLocation that's still
  used internally throughout Serve.
docstr_tok: ["Converts","DeploymentMode","enum","into","ProxyLocation","enum",".","DeploymentMode","is","a","deprecated","version","of","ProxyLocation","that","'s","still","used","internally","throughout","Serve","."]
code: def _from_deployment_mode(
      cls, deployment_mode: Optional[Union[DeploymentMode, str]]
  ) -> Optional["ProxyLocation"]:
      """Converts DeploymentMode enum into ProxyLocation enum.
  
      DeploymentMode is a deprecated version of ProxyLocation that's still
      used internally throughout Serve.
      """
  
      if deployment_mode is None:
          return None
      elif isinstance(deployment_mode, str):
          deployment_mode = DeploymentMode(deployment_mode)
      elif not isinstance(deployment_mode, DeploymentMode):
          raise TypeError(
              f"Must be a `DeploymentMode` or str, got: {type(deployment_mode)}."
          )
  
      if deployment_mode == DeploymentMode.NoServer:
          return ProxyLocation.Disabled
      else:
          return ProxyLocation(deployment_mode.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 2 for calling the ProxyLocation obj's underlying member method code with example usage: obj._from_deployment_mode(cls, deployment_mode) and returns: None, ProxyLocation, ProxyLocation