code: def get_deploy_mode(deploy_params):
      """
      Get the server deployment mode set in the yaml configuration file
      single, cluster, cluster_3rd
      """
      deploy_mode = None
      if deploy_params:
          milvus_params = None
          if "milvus" in deploy_params:
              milvus_params = deploy_params["milvus"]
          if not milvus_params:
              deploy_mode = config.DEFUALT_DEPLOY_MODE
          elif "deploy_mode" in milvus_params:
              deploy_mode = milvus_params["deploy_mode"]
              if deploy_mode not in [
                  config.SINGLE_DEPLOY_MODE,
                  config.CLUSTER_DEPLOY_MODE,
                  config.CLUSTER_3RD_DEPLOY_MODE,
              ]:
                  raise Exception(
                      "Invalid deploy mode: %s" % deploy_mode
                  )
      return deploy_mode
  
imports: import time
  import logging
  import string
  import random
  import requests
  import json
  import os
  from yaml.representer import SafeRepresenter
  import yaml
  import tableprint
  import config
label_desc: Use image node_id 8 for calling a global function with example usage: get_deploy_mode(deploy_params) and returns: deploy_mode