code: def test_impute_sex_chromosome_ploidy_2():
      ref_mt = get_impute_sex_chromosome_ploidy_ref_mt()
      var_mt = get_impute_sex_chromosome_ploidy_var_mt()
      vds = hl.vds.VariantDataset(ref_mt, var_mt)
  
      calling_intervals = [
          hl.parse_locus_interval(
              "22:1000010-1000020", reference_genome="GRCh37"
          ),
          hl.parse_locus_interval(
              "22:2000020-2000030", reference_genome="GRCh37"
          ),
          hl.parse_locus_interval(
              f"X:{X_PAR_END}-{X_PAR_END + 20}",
              reference_genome="GRCh37",
          ),
          hl.parse_locus_interval(
              f"X:{X_PAR_END + 32}-{X_PAR_END + 40}",
              reference_genome="GRCh37",
          ),
          hl.parse_locus_interval(
              f"Y:{Y_PAR_END}-{Y_PAR_END + 20}",
              reference_genome="GRCh37",
          ),
          hl.parse_locus_interval(
              f"Y:{Y_PAR_END + 32}-{Y_PAR_END + 40}",
              reference_genome="GRCh37",
          ),
      ]
      r = hl.vds.impute_sex_chromosome_ploidy(
          vds,
          calling_intervals,
          normalization_contig="22",
          use_variant_dataset=True,
      )
  
      assert r.collect() == [
          hl.Struct(
              s="sample_xx",
              autosomal_mean_dp=5.0,
              x_mean_dp=5.0,
              x_ploidy=2.0,
              y_mean_dp=0.0,
              y_ploidy=0.0,
          ),
          hl.Struct(
              s="sample_xy",
              autosomal_mean_dp=5.0,
              x_mean_dp=3.0,
              x_ploidy=1.2,
              y_mean_dp=2.0,
              y_ploidy=0.8,
          ),
      ]
  
imports: import os
  import pytest
  import hail
  from hail.utils import new_temp_file
  from hail.vds.combiner.combine import defined_entry_fields
  from ..helpers import resource, test_timeout, qobtest
label_desc: Use image node_id 15 for calling a global function with example usage: test_impute_sex_chromosome_ploidy_2() without return types