docstr: Method：
  1. prepare a collection with multi segments
  2. create rgA with 2 nodes and rgB with 3 nodes
  7. reload 2 replicas into rgA
  8. transfer 2 replicas from rgA to rgB
docstr_tok: ["Method\uff1a","1.","prepare","a","collection","with","multi","segments","2.","create","rgA","with","2","nodes","and","rgB","with","3","nodes","7.","reload","2","replicas","into","rgA","8.","transfer","2","replicas","from","rgA","to","rgB"]
code: def test_transfer_multi_replicas_into_one_rg(self, with_growing):
      """
      Method：
      1. prepare a collection with multi segments
      2. create rgA with 2 nodes and rgB with 3 nodes
      7. reload 2 replicas into rgA
      8. transfer 2 replicas from rgA to rgB
      """
      self._connect()
      rgA_name = cf.gen_unique_str("rgA")
      self.init_resource_group(name=rgA_name)
      rgB_name = cf.gen_unique_str("rgB")
      self.init_resource_group(name=rgB_name)
  
      # transfer 2 nodes to rgA, 3 nodes to rgB
      self.utility_wrap.transfer_node(
          source=ct.default_resource_group_name,
          target=rgA_name,
          num_node=2,
      )
      self.utility_wrap.transfer_node(
          source=ct.default_resource_group_name,
          target=rgB_name,
          num_node=3,
      )
  
      dim = 128
      collection_w = self.init_collection_wrap(shards_num=4)
      insert_ids = []
      nb = 500
      for i in range(5):
          res, _ = collection_w.insert(
              cf.gen_default_list_data(nb=nb, dim=dim, start=i * nb)
          )
          collection_w.flush()
          insert_ids.extend(res.primary_keys)
      collection_w.create_index(
          ct.default_float_vec_field_name, ct.default_flat_index
      )
  
      #  release collection and reload 2 replicas into rgA
      num_replica = 2
      collection_w.load(
          replica_number=num_replica, _resource_groups=[rgA_name]
      )
  
      # make growing
      if with_growing:
          res, _ = collection_w.insert(
              cf.gen_default_list_data(nb, dim=dim, start=6 * nb)
          )
          insert_ids.extend(res.primary_keys)
  
      # verify replicas
      replicas = collection_w.get_replicas()
      assert len(replicas[0].groups) == num_replica
      for rep in replicas[0].groups:
          assert rep.resource_group in [rgA_name]
          assert rep.num_outbound_node == {}
          assert len(rep.group_nodes) == 1  # 1 node for each replica
  
      #  transfer 2 replicas from rgA to rgB
      self.utility_wrap.transfer_replica(
          source=rgA_name,
          target=rgB_name,
          collection_name=collection_w.name,
          num_replica=num_replica,
      )
  
      # verify replicas
      replicas = collection_w.get_replicas()
      assert len(replicas[0].groups) == num_replica
      for rep in replicas[0].groups:
          assert rep.resource_group in [rgB_name]
          assert rep.num_outbound_node == {rgA_name: 1}
  
      # verify rg state
      rgA_info = {
          "name": rgA_name,
          "capacity": 2,
          "num_available_node": 2,
          "num_loaded_replica": {},
          "num_outgoing_node": {},
          "num_incoming_node": {collection_w.name: 2},
      }
      self.utility_wrap.describe_resource_group(
          name=rgA_name,
          check_task=CheckTasks.check_rg_property,
          check_items=rgA_info,
      )
      rgB_info = {
          "name": rgB_name,
          "capacity": 3,
          "num_available_node": 3,
          "num_loaded_replica": {collection_w.name: 2},
          "num_outgoing_node": {collection_w.name: 2},
          "num_incoming_node": {},
      }
      self.utility_wrap.describe_resource_group(
          name=rgB_name,
          check_task=CheckTasks.check_rg_property,
          check_items=rgB_info,
      )
  
      # verify search succ
      nq = 5
      vectors = [
          [random.random() for _ in range(dim)] for _ in range(nq)
      ]
      collection_w.search(
          vectors[:nq],
          ct.default_float_vec_field_name,
          ct.default_search_params,
          ct.default_limit,
          check_task=CheckTasks.check_search_results,
          check_items={
              "nq": nq,
              "ids": insert_ids.copy(),
              "limit": ct.default_limit,
          },
      )
  
      # wait transfer completed for replicas
      time.sleep(120)
      # make growing
      if with_growing:
          res, _ = collection_w.insert(
              cf.gen_default_list_data(nb, dim=dim, start=7 * nb)
          )
          insert_ids.extend(res.primary_keys)
  
      rgA_info = {
          "name": rgA_name,
          "capacity": 2,
          "num_available_node": 2,
          "num_loaded_replica": {},
          "num_outgoing_node": {},
          "num_incoming_node": {},
      }
      self.utility_wrap.describe_resource_group(
          name=rgA_name,
          check_task=CheckTasks.check_rg_property,
          check_items=rgA_info,
      )
      rgB_info = {
          "name": rgB_name,
          "capacity": 3,
          "num_available_node": 3,
          "num_loaded_replica": {collection_w.name: 2},
          "num_outgoing_node": {},
          "num_incoming_node": {},
      }
      self.utility_wrap.describe_resource_group(
          name=rgB_name,
          check_task=CheckTasks.check_rg_property,
          check_items=rgB_info,
      )
  
      # verify search succ
      collection_w.search(
          vectors[:nq],
          ct.default_float_vec_field_name,
          ct.default_search_params,
          ct.default_limit,
          check_task=CheckTasks.check_search_results,
          check_items={
              "nq": nq,
              "ids": insert_ids.copy(),
              "limit": ct.default_limit,
          },
      )
  
      # verify replicas
      replicas = collection_w.get_replicas()
      assert len(replicas[0].groups) == num_replica
      for rep in replicas[0].groups:
          assert rep.resource_group in [rgB_name]
          assert rep.num_outbound_node == {}
          assert 1 <= len(rep.group_nodes) <= 2
  
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 5 for calling the TestResourceGroupMultiNodes obj's underlying member method code with example usage: obj.test_transfer_multi_replicas_into_one_rg(with_growing) without return types