code: def init_collection(
      self,
      collection_name,
      pk_field="id",
      metric_type="L2",
      dim=128,
      nb=100,
      batch_size=1000,
  ):
      # create collection
      schema_payload = {
          "collectionName": collection_name,
          "dimension": dim,
          "metricType": metric_type,
          "description": "test collection",
          "primaryField": pk_field,
          "vectorField": "vector",
      }
      rsp = self.collection_client.collection_create(schema_payload)
      assert rsp["code"] == 200
      self.wait_collection_load_completed(collection_name)
      batch_size = batch_size
      batch = nb // batch_size
      # in case of nb < batch_size
      if batch == 0:
          batch = 1
          batch_size = nb
      data = []
      for i in range(batch):
          nb = batch_size
          data = get_data_by_payload(schema_payload, nb)
          payload = {"collectionName": collection_name, "data": data}
          body_size = sys.getsizeof(json.dumps(payload))
          logger.info(f"body size: {body_size / 1024 / 1024} MB")
          rsp = self.vector_client.vector_insert(payload)
          assert rsp["code"] == 200
      return schema_payload, data
  
file_path: milvus/tests/restful_client/base/testbase.py
imports: import json
  import sys
  import pytest
  import time
  from pymilvus import connections, db
  from utils.util_log import test_log
  from api.milvus import VectorClient, CollectionClient
  from utils.utils import get_data_by_payload
label_desc: Use image node_id 3 for calling the TestBase obj's underlying member method code with example usage: obj.init_collection(collection_name, pk_field, metric_type, dim, nb, batch_size) and returns: schema_payload,  data