code: def test_filter_samples_and_merge():
      vds = hl.vds.read_vds(
          os.path.join(resource("vds"), "1kg_chr22_5_samples.vds")
      )
      vds.reference_data = vds.reference_data.drop("ref_allele")
  
      samples = vds.variant_data.cols()
      samples = samples.add_index()
  
      samples1 = samples.filter(samples.idx < 2)
      samples2 = samples.filter(samples.idx >= 2)
  
      split1 = hl.vds.filter_samples(
          vds, samples1, remove_dead_alleles=True
      )
  
      assert split1.variant_data.count_cols() == 2
      assert split1.reference_data.count_cols() == 2
  
      split2 = hl.vds.filter_samples(
          vds, samples2, remove_dead_alleles=True
      )
  
      assert split2.variant_data.count_cols() == 3
      assert split2.reference_data.count_cols() == 3
  
      merged = hl.vds.combiner.combine_variant_datasets(
          [split1, split2]
      )
  
      assert merged.reference_data._same(vds.reference_data)
      assert merged.variant_data._same(vds.variant_data)
  
imports: import os
  import pytest
  import hail
  from hail.utils import new_temp_file
  from hail.vds.combiner.combine import defined_entry_fields
  from ..helpers import resource, test_timeout, qobtest
label_desc: Use image node_id 7 for calling a global function with example usage: test_filter_samples_and_merge() without return types