class_docstr: Class (or function) decorated with the `@serve.deployment` decorator.
  
  This is run on a number of replica actors. Requests to those replicas call
  this class.
  
  One or more deployments can be composed together into an `Application` which is
  then run via `serve.run` or a config file.
  
  Example:
  
  .. code-block:: python
  
      @serve.deployment
      class MyDeployment:
          def __init__(self, name: str):
              self._name = name
  
          def __call__(self, request):
              return "Hello world!"
  
          app = MyDeployment.bind()
          # Run via `serve.run` or the `serve run` CLI command.
          serve.run(app)
docstr: Bind the arguments to the deployment and return an Application.
  
  The returned Application can be deployed using `serve.run` (or via
  config file) or bound to another deployment for composition.
docstr_tok: ["Bind","the","arguments","to","the","deployment","and","return","an","Application",".","The","returned","Application","can","be","deployed","using","`","serve.run","`","(","or","via","config","file",")","or","bound","to","another","deployment","for","composition","."]
code: def bind(self, *args, **kwargs) -> Application:
      """Bind the arguments to the deployment and return an Application.
  
      The returned Application can be deployed using `serve.run` (or via
      config file) or bound to another deployment for composition.
      """
  
      schema_shell = deployment_to_schema(self)
  
      if inspect.isfunction(self.func_or_class):
          dag_node = FunctionNode(
              self.func_or_class,
              args,  # Used to bind and resolve DAG only, can take user input
              kwargs,  # Used to bind and resolve DAG only, can take user input
              self._replica_config.ray_actor_options or dict(),
              other_args_to_resolve={
                  "deployment_schema": schema_shell,
                  "is_from_serve_deployment": True,
              },
          )
      else:
          dag_node = ClassNode(
              self.func_or_class,
              args,
              kwargs,
              cls_options=self._replica_config.ray_actor_options
              or dict(),
              other_args_to_resolve={
                  "deployment_schema": schema_shell,
                  "is_from_serve_deployment": True,
              },
          )
  
      return Application._from_internal_dag_node(dag_node)
  
imports: import inspect
  import logging
  import warnings
  from copy import deepcopy
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  from ray.dag.class_node import ClassNode
  from ray.dag.dag_node import DAGNodeBase
  from ray.dag.function_node import FunctionNode
  from ray.serve._private.config import DeploymentConfig, ReplicaConfig
  from ray.serve._private.constants import SERVE_LOGGER_NAME
  from ray.serve._private.utils import DEFAULT, Default
  from ray.serve.config import AutoscalingConfig
  from ray.serve.context import _get_global_client
  from ray.serve.handle import RayServeHandle, RayServeSyncHandle
  from ray.serve.schema import DeploymentSchema, LoggingConfig, RayActorOptionsSchema
  from ray.util.annotations import Deprecated, PublicAPI
label_desc: Use image node_id 16 for calling the Deployment obj's underlying member method code with example usage: obj.bind() and returns: Application