docstr: Method:
  1. create a collection and insert data
  2. release if loaded
  3. create rgA and rgB
  4. load collection with different replicas into rgA and rgB
  5. load collection with different replicas into default rg and rgA
docstr_tok: ["Method",":","1.","create","a","collection","and","insert","data","2.","release","if","loaded","3.","create","rgA","and","rgB","4.","load","collection","with","different","replicas","into","rgA","and","rgB","5.","load","collection","with","different","replicas","into","default","rg","and","rgA"]
code: def test_load_collection_with_multi_replicas_multi_rgs(
      self, replicas
  ):
      """
      Method:
      1. create a collection and insert data
      2. release if loaded
      3. create rgA and rgB
      4. load collection with different replicas into rgA and rgB
      5. load collection with different replicas into default rg and rgA
      """
      self._connect()
      # 1. create a collectionA and insert data
      collection_w, _, _, _, _ = self.init_collection_general(
          insert_data=True
      )
      # 2. release the collection if loaded
      collection_w.release()
      # 3. create a rgA and rgB
      rgA_name = cf.gen_unique_str("rgA")
      self.init_resource_group(rgA_name)
      rgB_name = cf.gen_unique_str("rgB")
      self.init_resource_group(rgB_name)
  
      # load with different replicas
      error = {
          ct.err_code: 999,
          ct.err_msg: "failed to load collection, err=failed to spawn replica for collection[resource group num can only be 0, 1 or same as replica number]",
      }
      collection_w.load(
          replica_number=replicas,
          _resource_groups=[rgA_name, rgB_name],
          check_task=CheckTasks.err_res,
          check_items=error,
      )
  
      error = {
          ct.err_code: 999,
          ct.err_msg: "failed to load collection, err=load operation can't use default resource group and other resource group together",
      }
      collection_w.load(
          replica_number=replicas,
          _resource_groups=[ct.default_resource_group_name, rgB_name],
          check_task=CheckTasks.err_res,
          check_items=error,
      )
  
imports: import pytest
  from base.client_base import TestcaseBase
  from common import common_func
  from common import common_type
  from common.common_type import CaseLabel, CheckTasks
  from utils.util_pymilvus import *
label_desc: Use image node_id 6 for calling the TestTransferNode obj's underlying member method code with example usage: obj.test_load_collection_with_multi_replicas_multi_rgs(replicas) without return types