code: def check_config(chaos_config):
      if not chaos_config.get("kind", None):
          raise Exception("kind must be specified")
      if not chaos_config.get("spec", None):
          raise Exception("spec must be specified")
      if "action" not in chaos_config.get("spec", None):
          raise Exception("action must be specified in spec")
      if "selector" not in chaos_config.get("spec", None):
          raise Exception("selector must be specified in spec")
      return True
  
file_path: milvus/tests/python_client/chaos/chaos_commons.py
imports: import os
  import threading
  import time
  import glob
  from chaos import constants
  from yaml import full_load
  from utils.util_log import test_log
  from delayed_assert import expect
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: check_config(chaos_config) and returns: True