class_docstr: runner is actually the executors
class_docstr_tok: ["runner","is","actually","the","executors"]
docstr: insert data to collection before testing 
docstr_tok: ["insert","data","to","collection","before","testing"]
code: def insert(
      self, milvus, collection_name, data_type, dimension, size, ni
  ):
      """insert data to collection before testing"""
      total_time = 0.0
      rps = 0.0
      ni_time = 0.0
      vectors_per_file = utils.get_len_vectors_per_file(
          data_type, dimension
      )
      if size % vectors_per_file or size % ni:
          """
          An error is reported when
          the amount of data inserted in a single time cannot divide the total amount of data
          """
          logger.error("Not invalid collection size or ni")
          return False
      i = 0
      info = milvus.get_info(collection_name)
      if data_type == "local" or not data_type:
          # insert local
          info = milvus.get_info(collection_name)
          while i < (size // vectors_per_file):
              vectors = []
              for j in range(vectors_per_file // ni):
                  # vectors = src_vectors[j * ni:(j + 1) * ni]
                  vectors = utils.generate_vectors(ni, dimension)
                  if vectors:
                      start_id = i * vectors_per_file + j * ni
                      ni_time = self.insert_core(
                          milvus, info, start_id, vectors
                      )
                      total_time = total_time + ni_time
              i += 1
      else:
          # insert from file
          while i < (size // vectors_per_file):
              vectors = []
              if vectors_per_file >= ni:
                  # Get the path of the specified file
                  file_name = utils.gen_file_name(
                      i, dimension, data_type
                  )
                  # logger.info("Load npy file: %s start" % file_name)
                  # Load file content
                  data = np.load(file_name)
                  # logger.info("Load npy file: %s end" % file_name)
                  for j in range(vectors_per_file // ni):
                      vectors = data[j * ni : (j + 1) * ni].tolist()
                      if vectors:
                          start_id = i * vectors_per_file + j * ni
                          ni_time = self.insert_core(
                              milvus, info, start_id, vectors
                          )
                          total_time = total_time + ni_time
                  i += 1
              else:
                  vectors.clear()
                  loops = ni // vectors_per_file
                  for j in range(loops):
                      file_name = utils.gen_file_name(
                          loops * i + j, dimension, data_type
                      )
                      data = np.load(file_name)
                      vectors.extend(data.tolist())
                  if vectors:
                      start_id = i * vectors_per_file
                      ni_time = self.insert_core(
                          milvus, info, start_id, vectors
                      )
                      total_time = total_time + ni_time
                  i += loops
      rps = round(size / total_time, 2)
      ni_time = round(total_time / (size / ni), 2)
      result = {
          "total_time": round(total_time, 2),
          "rps": rps,
          "ni_time": ni_time,
      }
      logger.info(result)
      return result
  
imports: import time
  import pdb
  import logging
  import traceback
  import grpc
  import numpy
  from milvus_benchmark.env import get_env
  from milvus_benchmark.client import MilvusClient
  from .None import utils
label_desc: Use image node_id 13 for calling the BaseRunner obj's underlying member method code with example usage: obj.insert(milvus, collection_name, data_type, dimension, size, ni) and returns: result, False