code: def test_ld_score_annotated(self):
      mt = self.get_ld_score_mt()
      ht_annotated = hl.experimental.ld_score(
          entry_expr=mt.GT.n_alt_alleles(),
          locus_expr=mt.locus,
          radius=1.0,
          coord_expr=mt.cm_position,
          annotation_exprs=[mt.binary, mt.continuous],
      )
      annotated = ht_annotated.aggregate(
          hl.struct(
              chr20=hl.struct(
                  binary=hl.agg.filter(
                      (ht_annotated.locus.contig == "20")
                      & (ht_annotated.locus.position == 82079),
                      hl.agg.collect(ht_annotated.binary),
                  )[0],
                  continuous=hl.agg.filter(
                      (ht_annotated.locus.contig == "20")
                      & (ht_annotated.locus.position == 82079),
                      hl.agg.collect(ht_annotated.continuous),
                  )[0],
              ),
              chr22=hl.struct(
                  binary=hl.agg.filter(
                      (ht_annotated.locus.contig == "22")
                      & (ht_annotated.locus.position == 16894090),
                      hl.agg.collect(ht_annotated.binary),
                  )[0],
                  continuous=hl.agg.filter(
                      (ht_annotated.locus.contig == "22")
                      & (ht_annotated.locus.position == 16894090),
                      hl.agg.collect(ht_annotated.continuous),
                  )[0],
              ),
              mean_stats=hl.struct(
                  binary=hl.agg.mean(ht_annotated.binary),
                  continuous=hl.agg.mean(ht_annotated.continuous),
              ),
          )
      )
  
      self.assertAlmostEqual(annotated.chr20.binary, 1.152, places=3)
      self.assertAlmostEqual(
          annotated.chr20.continuous, 73.014, places=3
      )
      self.assertAlmostEqual(annotated.chr22.binary, 1.107, places=3)
      self.assertAlmostEqual(
          annotated.chr22.continuous, 102.174, places=3
      )
      self.assertAlmostEqual(
          annotated.mean_stats.binary, 0.965, places=3
      )
      self.assertAlmostEqual(
          annotated.mean_stats.continuous, 176.528, places=3
      )
  
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 3 for calling the Tests obj's underlying member method code with example usage: obj.test_ld_score_annotated() without return types