class_docstr: test other interface that has db_name params
class_docstr_tok: ["test","other","interface","that","has","db_name","params"]
docstr: prepare data in db collection
  :return:
  :rtype:
docstr_tok: ["prepare","data","in","db","collection",":","return",":",":","rtype",":"]
code: def prepare_data_for_db_search(self):
      """
      prepare data in db collection
      :return:
      :rtype:
      """
      self._connect()
  
      # create a db
      db_name = cf.gen_unique_str("a")
      self.database_wrap.create_database(db_name)
  
      # using db
      self.database_wrap.using_database(db_name)
  
      # create collection and a partition
      partition_name = "p1"
      self.collection_wrap.init_collection(
          name=cf.gen_unique_str(prefix),
          schema=cf.gen_default_collection_schema(
              enable_dynamic_field=True
          ),
      )
      self.partition_wrap.init_partition(
          self.collection_wrap.collection, partition_name
      )
  
      # insert data into collection
      df = pd.DataFrame(
          {
              ct.default_int64_field_name: pd.Series(
                  data=[i for i in range(ct.default_nb)]
              ),
              ct.default_float_vec_field_name: cf.gen_vectors(
                  ct.default_nb, ct.default_dim
              ),
          }
      )
      self.collection_wrap.insert(df)
      self.collection_wrap.flush()
  
      # create index with COSINE metrics
      _index = {
          "index_type": "HNSW",
          "metric_type": "COSINE",
          "params": {"M": 8, "efConstruction": 200},
      }
      self.collection_wrap.create_index(
          ct.default_float_vec_field_name, _index
      )
  
      # load collection
      self.collection_wrap.load()
  
      # insert data into partition with dynamic field
      data_par = cf.gen_default_rows_data(start=ct.default_nb)
      log.info(data_par[0].keys())
      self.collection_wrap.insert(
          data_par, partition_name=self.partition_wrap.name
      )
  
      return db_name, partition_name
  
imports: import pandas
  import pytest
  from base.client_base import TestcaseBase
  from common.common_type import CheckTasks, CaseLabel
  from common import common_func
  from common import common_type
  from utils.util_log import test_log
label_desc: Use image node_id 9 for calling the TestDatabaseOtherApi obj's underlying member method code with example usage: obj.prepare_data_for_db_search() and returns: db_name,  partition_name