docstr: target: test compact merge multi shards
  method: 1.Create a collection with 2 shards
          2.Insert twice and generate 4 segments
          3.Compact and wait it completed
  expected: Verify there are 2 merge type complation plans
docstr_tok: ["target",":","test","compact","merge","multi","shards","method",":","1.Create","a","collection","with","2","shards","2.Insert","twice","and","generate","4","segments","3.Compact","and","wait","it","completed","expected",":","Verify","there","are","2","merge","type","complation","plans"]
code: def test_compact_merge_multi_shards(self):
      """
      target: test compact merge multi shards
      method: 1.Create a collection with 2 shards
              2.Insert twice and generate 4 segments
              3.Compact and wait it completed
      expected: Verify there are 2 merge type complation plans
      """
      collection_w = self.init_collection_wrap(
          cf.gen_unique_str(prefix), shards_num=2
      )
      for i in range(2):
          df = cf.gen_default_dataframe_data(2 * tmp_nb)
          insert_res, _ = collection_w.insert(df)
          log.debug(collection_w.num_entities)
  
      collection_w.create_index(
          ct.default_float_vec_field_name, ct.default_index
      )
      collection_w.load()
      log.debug(
          self.utility_wrap.get_query_segment_info(collection_w.name)
      )
  
      collection_w.compact()
      collection_w.wait_for_compaction_completed()
      c_plans = collection_w.get_compaction_plans()[0]
      assert len(c_plans.plans) == 2
      targets = []
      for plan in c_plans.plans:
          assert len(plan.sources) == 2
          targets.append(plan.target)
  
      collection_w.release()
      collection_w.load()
      seg_info, _ = self.utility_wrap.get_query_segment_info(
          collection_w.name
      )
      for seg in seg_info:
          seg.segmentID in targets
  
imports: import threading
  from time import time, sleep
  import pytest
  from pymilvus.grpc_gen.common_pb2 import SegmentState
  from pymilvus.exceptions import MilvusException
  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_log import test_log
label_desc: Use image node_id 3 for calling the TestCompactionOperation obj's underlying member method code with example usage: obj.test_compact_merge_multi_shards() without return types