docstr: dim 128, 1000,000 entities loaded needed memory 3-5 Gi
docstr_tok: ["dim","128",",","1000,000","entities","loaded","needed","memory","3-5","Gi"]
code: def prepare_collection(self, host, port):
      """dim 128, 1000,000 entities loaded needed memory 3-5 Gi"""
      connections.connect("default", host=host, port=19530)
      collection_w = ApiCollectionWrapper()
      c_name = "stress_replicas_2"
      collection_w.init_collection(
          name=c_name,
          schema=cf.gen_default_collection_schema(dim=self.dim),
      )
  
      # insert 10 sealed segments
      for i in range(20):
          t0 = datetime.datetime.now()
          df = cf.gen_default_dataframe_data(nb=nb, dim=dim)
          res = collection_w.insert(df)[0]
          assert res.insert_count == nb
          log.info(
              f"After {i + 1} insert, num_entities: {collection_w.num_entities}"
          )
          tt = datetime.datetime.now() - t0
          log.info(f"{i} insert and flush data cost: {tt}")
  
      log.debug(collection_w.num_entities)
      return collection_w
  
imports: import random
  import threading
  import time
  from time import sleep
  import pytest
  import datetime
  from pymilvus import connections
  from base.collection_wrapper import ApiCollectionWrapper
  from base.utility_wrapper import ApiUtilityWrapper
  from chaos.checker import Op, CollectionCreateChecker, InsertFlushChecker, IndexCreateChecker, SearchChecker, QueryChecker
  from common.cus_resource_opts import CustomResourceOperations
  from common import common_func
  from common import common_type
  from chaos import chaos_commons
  from chaos.chaos_commons import gen_experiment_config, get_chaos_yamls, start_monitor_threads
  from common.common_type import CaseLabel, CheckTasks
  from chaos import constants
  from utils.util_log import test_log
  from utils.util_k8s import get_querynode_id_pod_pairs
label_desc: Use image node_id 1 for calling the TestMemoryStressReplica obj's underlying member method code with example usage: obj.prepare_collection(host, port) and returns: collection_w