class_docstr: run chaos
class_docstr_tok: ["run","chaos"]
code: def run_step(self, interface_name, interface_params):
      if interface_name == "create_collection":
          collection_name = utils.get_unique_name("chaos")
          self.data_type = interface_params["data_type"]
          self.dimension = interface_params["dimension"]
          self.milvus.set_collection(collection_name)
          vector_type = runner_utils.get_vector_type(self.data_type)
          self.milvus.create_collection(
              self.dimension, data_type=vector_type
          )
      elif interface_name == "insert":
          batch_size = interface_params["batch_size"]
          collection_size = interface_params["collection_size"]
          self.insert(
              self.milvus,
              self.milvus.collection_name,
              self.data_type,
              self.dimension,
              collection_size,
              batch_size,
          )
      elif interface_name == "create_index":
          metric_type = interface_params["metric_type"]
          index_type = interface_params["index_type"]
          index_param = interface_params["index_param"]
          vector_type = runner_utils.get_vector_type(self.data_type)
          field_name = runner_utils.get_default_field_name(vector_type)
          self.milvus.create_index(
              field_name,
              index_type,
              metric_type,
              index_param=index_param,
          )
      elif interface_name == "flush":
          self.milvus.flush()
  
imports: import copy
  import logging
  import time
  from operator import methodcaller
  from yaml import full_load, dump
  import threading
  from milvus_benchmark import utils
  from milvus_benchmark.runners import utils
  from milvus_benchmark.chaos import utils
  from milvus_benchmark.runners.base import BaseRunner
  from chaos.chaos_opt import ChaosOpt
  from milvus_benchmark import config
  from milvus_benchmark.chaos.chaos_mesh import PodChaos, NetworkChaos
label_desc: Use image node_id 2 for calling the SimpleChaosRunner obj's underlying member method code with example usage: obj.run_step(interface_name, interface_params) without return types