code: def test_sampleqc_old_new_equivalence():
      vds = hl.vds.read_vds(
          os.path.join(resource("vds"), "1kg_chr22_5_samples.vds")
      )
      sqc = hl.vds.sample_qc(vds)
  
      dense = hl.vds.to_dense_mt(vds)
      dense = dense.transmute_entries(
          GT=hl.vds.lgt_to_gt(dense.LGT, dense.LA)
      )
      res = hl.sample_qc(dense)
  
      res = res.annotate_cols(sample_qc_new=sqc[res.s])
  
      fields_to_test = [
          "n_het",
          "n_hom_var",
          "n_non_ref",
          "n_singleton",
          "n_snp",
          "n_insertion",
          "n_deletion",
          "n_transition",
          "n_transversion",
          "n_star",
          "r_ti_tv",
          "r_het_hom_var",
          "r_insertion_deletion",
      ]
  
      assert res.aggregate_cols(
          hl.all(
              *(
                  hl.agg.all(
                      res.sample_qc[field] == res.sample_qc_new[field]
                  )
                  for field in fields_to_test
              )
          )
      )
  
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 4 for calling a global function with example usage: test_sampleqc_old_new_equivalence() without return types