code: def test_pc_relate_against_R_truth():
      with hl.TemporaryDirectory(
          ensure_exists=False
      ) as vcf_f, hl.TemporaryDirectory(
          ensure_exists=False
      ) as hail_kin_f:
          mt = hl.import_vcf(
              resource("pc_relate_bn_input.vcf.bgz")
          ).checkpoint(vcf_f)
          hail_kin = hl.pc_relate(mt.GT, 0.00, k=2).checkpoint(
              hail_kin_f
          )
  
          with hl.TemporaryDirectory(ensure_exists=False) as r_kin_f:
              r_kin = hl.import_table(
                  resource("pc_relate_r_truth.tsv.bgz"),
                  types={
                      "i": "struct{s:str}",
                      "j": "struct{s:str}",
                      "kin": "float",
                      "ibd0": "float",
                      "ibd1": "float",
                      "ibd2": "float",
                  },
                  key=["i", "j"],
              ).checkpoint(r_kin_f)
              assert r_kin.select("kin")._same(
                  hail_kin.select("kin"), tolerance=1e-3, absolute=True
              )
              assert r_kin.select("ibd0")._same(
                  hail_kin.select("ibd0"),
                  tolerance=1.3e-2,
                  absolute=True,
              )
              assert r_kin.select("ibd1")._same(
                  hail_kin.select("ibd1"),
                  tolerance=2.6e-2,
                  absolute=True,
              )
              assert r_kin.select("ibd2")._same(
                  hail_kin.select("ibd2"),
                  tolerance=1.3e-2,
                  absolute=True,
              )
  
file_path: hail/hail/python/test/hail/methods/relatedness/test_pc_relate.py
imports: import hail
  from ...helpers import resource, skip_when_service_backend, test_timeout, skip_when_service_backend_in_azure, qobtest
label_desc: Use image node_id 1 for calling a global function with example usage: test_pc_relate_against_R_truth() without return types