code: def test_concordance(self):
      dataset = get_dataset()
      glob_conc, cols_conc, rows_conc = hl.concordance(dataset, dataset)
  
      self.assertEqual(
          sum([sum(glob_conc[i]) for i in range(5)]),
          dataset.count_rows() * dataset.count_cols(),
      )
  
      counts = dataset.aggregate_entries(
          hl.Struct(
              n_het=agg.filter(dataset.GT.is_het(), agg.count()),
              n_hom_ref=agg.filter(
                  dataset.GT.is_hom_ref(), agg.count()
              ),
              n_hom_var=agg.filter(
                  dataset.GT.is_hom_var(), agg.count()
              ),
              nNoCall=agg.filter(
                  hl.is_missing(dataset.GT), agg.count()
              ),
          )
      )
  
      self.assertEqual(glob_conc[0][0], 0)
      self.assertEqual(glob_conc[1][1], counts.nNoCall)
      self.assertEqual(glob_conc[2][2], counts.n_hom_ref)
      self.assertEqual(glob_conc[3][3], counts.n_het)
      self.assertEqual(glob_conc[4][4], counts.n_hom_var)
      [
          self.assertEqual(glob_conc[i][j], 0)
          for i in range(5)
          for j in range(5)
          if i != j
      ]
  
      self.assertTrue(
          cols_conc.all(
              hl.sum(hl.flatten(cols_conc.concordance))
              == dataset.count_rows()
          )
      )
      self.assertTrue(
          rows_conc.all(
              hl.sum(hl.flatten(rows_conc.concordance))
              == dataset.count_cols()
          )
      )
  
      with hl.TemporaryDirectory(ensure_exists=False) as outfile:
          cols_conc.write(outfile, overwrite=True)
          rows_conc.write(outfile, overwrite=True)
  
imports: import unittest
  import hail
  import hail.expr.aggregators
  from hail.utils.misc import new_temp_file
  from ..helpers import *
  from hail.methods.qc import VEPConfigGRCh37Version85, VEPConfigGRCh38Version95
label_desc: Use image node_id 6 for calling the Tests obj's underlying member method code with example usage: obj.test_concordance() without return types