class_docstr: run insert
class_docstr_tok: ["run","insert"]
code: def extract_cases(self, collection):
      collection_name = (
          collection["collection_name"]
          if "collection_name" in collection
          else None
      )
  
      (
          data_type,
          collection_size,
          dimension,
          metric_type,
      ) = parser.collection_parser(collection_name)
      ni_per = collection["ni_per"]
      build_index = (
          collection["build_index"]
          if "build_index" in collection
          else False
      )
      vector_type = runner_utils.get_vector_type(data_type)
      other_fields = (
          collection["other_fields"]
          if "other_fields" in collection
          else None
      )
      collection_info = {
          "dimension": dimension,
          "metric_type": metric_type,
          "dataset_name": collection_name,
          "collection_size": collection_size,
          "other_fields": other_fields,
          "ni_per": ni_per,
      }
      index_field_name = None
      index_type = None
      index_param = None
      index_info = None
      vector_field_name = runner_utils.get_default_field_name(
          vector_type
      )
      if build_index is True:
          index_type = collection["index_type"]
          index_param = collection["index_param"]
          index_info = {
              "index_type": index_type,
              "index_param": index_param,
          }
          index_field_name = runner_utils.get_default_field_name(
              vector_type
          )
      task = collection["task"]
      connection_type = "single"
      connection_num = task["connection_num"]
      if connection_num > 1:
          connection_type = "multi"
      run_params = {
          "task": collection["task"],
          "connection_type": connection_type,
      }
      self.init_metric(
          self.name, collection_info, index_info, None, run_params
      )
      case_metric = copy.deepcopy(self.metric)
      # set metric type as case
      case_metric.set_case_metric_type()
      case_metrics = list()
      case_params = list()
      case_metrics.append(case_metric)
      case_param = {
          "collection_name": collection_name,
          "data_type": data_type,
          "dimension": dimension,
          "collection_size": collection_size,
          "ni_per": ni_per,
          "metric_type": metric_type,
          "vector_type": vector_type,
          "other_fields": other_fields,
          "build_index": build_index,
          "index_field_name": index_field_name,
          "vector_field_name": vector_field_name,
          "index_type": index_type,
          "index_param": index_param,
          "task": collection["task"],
          "connection_type": connection_type,
      }
      case_params.append(case_param)
      return case_params, case_metrics
  
imports: import time
  import copy
  import logging
  from .None import locust_user
  from .base import BaseRunner
  from milvus_benchmark import parser
  from milvus_benchmark import utils
  from milvus_benchmark.runners import utils
label_desc: Use image node_id 2 for calling the LocustInsertRunner obj's underlying member method code with example usage: obj.extract_cases(collection) and returns: case_params,  case_metrics