code: def __init__(
      self,
      code_version: Optional[str],
      deployment_config: DeploymentConfig,
      ray_actor_options: Optional[Dict],
      placement_group_bundles: Optional[List[Dict[str, float]]] = None,
      placement_group_strategy: Optional[str] = None,
      max_replicas_per_node: Optional[int] = None,
  ):
      if code_version is not None and not isinstance(code_version, str):
          raise TypeError(
              f"code_version must be str, got {type(code_version)}."
          )
      if code_version is None:
          self.code_version = get_random_string()
      else:
          self.code_version = code_version
  
      # Options for this field may be mutated over time, so any logic that uses this
      # should access this field directly.
      self.deployment_config = deployment_config
      self.ray_actor_options = ray_actor_options
      self.placement_group_bundles = placement_group_bundles
      self.placement_group_strategy = placement_group_strategy
      self.max_replicas_per_node = max_replicas_per_node
      self.compute_hashes()
  
imports: import json
  import logging
  from abc import ABC
  from copy import deepcopy
  from typing import Any, Dict, List, Optional
  from zlib import crc32
  from ray._private.pydantic_compat import BaseModel
  from ray.serve._private.config import DeploymentConfig
  from ray.serve._private.utils import DeploymentOptionUpdateType, get_random_string
  from ray.serve.generated.serve_pb2 import DeploymentVersion
label_desc: Use image node_id 1 to create a new DeploymentVersion object  with example: obj = DeploymentVersion(code_version, deployment_config, ray_actor_options, placement_group_bundles, placement_group_strategy, max_replicas_per_node)