code: def test_ld_score_regression_2(self):
      ht_50_irnt = self.get_ht_50_irnt()
      ht_20160 = self.get_ht_20160()
  
      ht = ht_50_irnt.annotate(
          chi_squared_50_irnt=ht_50_irnt["chi_squared"],
          n_50_irnt=ht_50_irnt["n"],
          chi_squared_20160=ht_20160[ht_50_irnt.key]["chi_squared"],
          n_20160=ht_20160[ht_50_irnt.key]["n"],
      )
  
      ht_results = hl.experimental.ld_score_regression(
          weight_expr=ht["ld_score"],
          ld_score_expr=ht["ld_score"],
          chi_sq_exprs=[
              ht["chi_squared_50_irnt"],
              ht["chi_squared_20160"],
          ],
          n_samples_exprs=[ht["n_50_irnt"], ht["n_20160"]],
          n_blocks=20,
          two_step_threshold=5,
          n_reference_panel_variants=1173569,
      )
  
      results = {
          x["phenotype"]: {
              "mean_chi_sq": x["mean_chi_sq"],
              "intercept_estimate": x["intercept"]["estimate"],
              "intercept_standard_error": x["intercept"][
                  "standard_error"
              ],
              "snp_heritability_estimate": x["snp_heritability"][
                  "estimate"
              ],
              "snp_heritability_standard_error": x["snp_heritability"][
                  "standard_error"
              ],
          }
          for x in ht_results.collect()
      }
  
      self.assertAlmostEqual(
          results[0]["mean_chi_sq"], 3.4386, places=4
      )
      self.assertAlmostEqual(
          results[0]["intercept_estimate"], 0.7727, places=4
      )
      self.assertAlmostEqual(
          results[0]["intercept_standard_error"], 0.2461, places=4
      )
      self.assertAlmostEqual(
          results[0]["snp_heritability_estimate"], 0.3845, places=4
      )
      self.assertAlmostEqual(
          results[0]["snp_heritability_standard_error"],
          0.1067,
          places=4,
      )
  
      self.assertAlmostEqual(
          results[1]["mean_chi_sq"], 1.5209, places=4
      )
      self.assertAlmostEqual(
          results[1]["intercept_estimate"], 1.2109, places=4
      )
      self.assertAlmostEqual(
          results[1]["intercept_standard_error"], 0.2238, places=4
      )
      self.assertAlmostEqual(
          results[1]["snp_heritability_estimate"], 0.0486, places=4
      )
      self.assertAlmostEqual(
          results[1]["snp_heritability_standard_error"],
          0.0416,
          places=4,
      )
  
imports: import numpy
  import hail
  import unittest
  import pytest
  from ..helpers import *
  from hail.utils import new_temp_file
label_desc: Use image node_id 9 for calling the Tests obj's underlying member method code with example usage: obj.test_ld_score_regression_2() without return types