code: def test_linear_skat_no_weights_R_truth():
      # library('SKAT')
      # dat <- matrix(c(0,1,0,1,
      #                 1,0,1,0,
      #                 0,0,2,0,
      #                 0,0,0,2,
      #                 0,0,2,1),
      #               5,
      #               4,
      #               byrow=TRUE)
      # cov <- data.frame(pheno=c(3., 4., 6., 4., 1.), cov1=c(1.,3.,0.,6.,1.), cov2=c(2.,4.,9.,1.,1.))
      # weights <- c(1,1,1,1)
      # null_model <- SKAT_Null_Model(cov$pheno ~ cov$cov1+ cov$cov2, out_type="D", Adjustment=FALSE)
      # result <- SKAT(dat, null_model, method="davies", weights=weights)
      # cat(result$p.value, result$Q)
      expected_p_value = 0.2700286
      expected_Q_value = 2.854975
  
      genotypes = [
          [0, 1, 0, 0, 0],
          [1, 0, 0, 0, 0],
          [0, 1, 2, 0, 2],
          [1, 0, 0, 2, 1],
      ]
      covariates = [[1, 2], [3, 4], [0, 9], [6, 1], [1, 1]]
      phenotypes = [3, 4, 6, 4, 1]
      weights = [1, 1, 1, 1]
  
      mt = hl.utils.range_matrix_table(4, 5)
      mt = mt.annotate_entries(
          GT=hl.unphased_diploid_gt_index_call(
              hl.literal(genotypes)[mt.row_idx][mt.col_idx]
          )
      )
      mt = mt.annotate_cols(
          phenotype=hl.literal(phenotypes)[mt.col_idx],
          cov1=hl.literal(covariates)[mt.col_idx][0],
          cov2=hl.literal(covariates)[mt.col_idx][1],
      )
      mt = mt.annotate_rows(weight=hl.literal(weights)[mt.row_idx])
      mt = mt.annotate_globals(group=0)
      ht = hl._linear_skat(
          mt.group,
          mt.weight,
          mt.phenotype,
          mt.GT.n_alt_alleles(),
          [1.0, mt.cov1, mt.cov2],
      )
      results = ht.collect()
  
      assert len(results) == 1
      result = results[0]
      assert result.size == 4
      assert result.q_stat == pytest.approx(expected_Q_value, abs=5e-7)
      assert result.p_value == pytest.approx(expected_p_value, abs=5e-8)
      assert result.fault == 0
  
imports: import hail
  import pytest
  from hail.utils import FatalError, HailUserError
  from ..helpers import resource, test_timeout, qobtest
label_desc: Use image node_id 6 for calling a global function with example usage: test_linear_skat_no_weights_R_truth() without return types