code: def normalize_genotypes(genotype):
      r"""Normalizes genotypes to have mean 0 and variance 1 at each SNP
  
      Parameters
      ----------
      genotype : :class:`.Expression` or :class:`.CallExpression`
          Entry field of genotypes.
  
      Returns
      -------
      :class:`.MatrixTable`
          :class:`.MatrixTable` with normalized genotypes.
      """
      uid = Env.get_uid(base=100)
      mt = genotype._indices.source
      mt = mt.annotate_entries(
          **{
              "gt_" + uid: genotype.n_alt_alleles()
              if genotype.dtype is hl.dtype("call")
              else genotype
          }
      )
      mt = mt.annotate_rows(
          **{"gt_stats_" + uid: hl.agg.stats(mt["gt_" + uid])}
      )
      # TODO: Add MAF filter to remove invariant SNPs?
      mt = mt.annotate_entries(
          norm_gt=(mt["gt_" + uid] - mt["gt_stats_" + uid].mean)
          / mt["gt_stats_" + uid].stdev
      )
      mt = _clean_fields(mt, uid)
      return mt
  
imports: import hail
  from hail.typecheck import typecheck, oneof, nullable
  from hail.expr.expressions import expr_float64, expr_int32, expr_array, expr_call
  from hail.matrixtable import MatrixTable
  from hail.table import Table
  from hail.utils.java import Env
  import numpy
  import pandas
  import scipy.stats
label_desc: Use image node_id 8 for calling a global function with example usage: normalize_genotypes(genotype) and returns: mt