code: def record_time_when_standby_activated(
      namespace, release_name, coord_type, timeout=360
  ):
      (
          activate_pod_list_before,
          standby_pod_list_before,
      ) = find_activate_standby_coord_pod(
          namespace, release_name, coord_type
      )
      log.info(
          f"check standby switch: activate_pod_list_before {activate_pod_list_before}, "
          f"standby_pod_list_before {standby_pod_list_before}"
      )
      standby_activated = False
      (
          activate_pod_list_after,
          standby_pod_list_after,
      ) = find_activate_standby_coord_pod(
          namespace, release_name, coord_type
      )
      start_time = time.time()
      end_time = time.time()
      while not standby_activated and end_time - start_time < timeout:
          try:
              (
                  activate_pod_list_after,
                  standby_pod_list_after,
              ) = find_activate_standby_coord_pod(
                  namespace, release_name, coord_type
              )
              if activate_pod_list_after[0] in standby_pod_list_before:
                  standby_activated = True
                  log.info(
                      f"Standby {coord_type} pod {activate_pod_list_after[0]} activated"
                  )
                  log.info(
                      f"check standby switch: activate_pod_list_after {activate_pod_list_after}, "
                      f"standby_pod_list_after {standby_pod_list_after}"
                  )
                  break
          except Exception as e:
              log.error(f"Exception when check standby switch: {e}")
          time.sleep(1)
          end_time = time.time()
      if standby_activated:
          log.info(
              f"Standby {coord_type} pod {activate_pod_list_after[0]} activated"
          )
      else:
          log.info(
              f"Standby {coord_type} pod does not switch standby mode"
          )
  
imports: import json
  import os.path
  import time
  import pyetcd
  import requests
  from pymilvus import connections
  from kubernetes import client, config
  from kubernetes.client.rest import ApiException
  from common.milvus_sys import MilvusSys
  from utils.util_log import test_log
  from chaos import chaos_commons
  from common.common_type import in_cluster_env
label_desc: Use image node_id 17 for calling a global function with example usage: record_time_when_standby_activated(namespace, release_name, coord_type, timeout) without return types