code: def gnomad_coverage_stats_optimized(mt_path):
      mt = hl.read_matrix_table(mt_path)
      mt = mt.annotate_rows(
          mean=hl.agg.mean(mt.x),
          count_array=hl.rbind(
              hl.agg.counter(hl.min(100, mt.x)),
              lambda c: hl.range(0, 100).map(lambda i: c.get(i, 0)),
          ),
      )
      mt = mt.annotate_rows(
          median=hl.rbind(
              hl.sum(mt.count_array) / 2,
              lambda s: hl.find(
                  lambda x: x > s,
                  hl.array_scan(lambda i, j: i + j, 0, mt.count_array),
              ),
          ),
          **{
              f"above_{x}": hl.sum(mt.count_array[x:])
              for x in [1, 5, 10, 15, 20, 25, 30, 50, 100]
          },
      )
      mt.rows()._force_count()
  
imports: from os import path
  from tempfile import TemporaryDirectory, NamedTemporaryFile
  import hail
  from .resources import *
  from .utils import benchmark
label_desc: Use image node_id 26 for calling a global function with example usage: gnomad_coverage_stats_optimized(mt_path) without return types