code: def test_reference_genome():
      rg = hl.get_reference("GRCh37")
      assert rg.name == "GRCh37"
      assert rg.contigs[0] == "1"
      assert rg.x_contigs == ["X"]
      assert rg.y_contigs == ["Y"]
      assert rg.mt_contigs == ["MT"]
      assert rg.par[0] == hl.eval(
          hl.parse_locus_interval("X:60001-2699521")
      )
      assert rg.contig_length("1") == 249250621
  
      name = "test"
      contigs = ["1", "X", "Y", "MT"]
      lengths = {"1": 10000, "X": 2000, "Y": 4000, "MT": 1000}
      x_contigs = ["X"]
      y_contigs = ["Y"]
      mt_contigs = ["MT"]
      par = [("X", 5, 1000)]
  
      gr2 = ReferenceGenome(
          name, contigs, lengths, x_contigs, y_contigs, mt_contigs, par
      )
      assert gr2.name == name
      assert gr2.contigs == contigs
      assert gr2.x_contigs == x_contigs
      assert gr2.y_contigs == y_contigs
      assert gr2.mt_contigs == mt_contigs
      assert gr2.par == [
          hl.eval(hl.parse_locus_interval("X:5-1000", gr2))
      ]
      assert gr2.contig_length("1") == 10000
      assert gr2.lengths == lengths
  
      with hl.TemporaryFilename() as filename:
          gr2.write(filename)
  
file_path: hail/hail/python/test/hail/genetics/test_reference_genome.py
imports: import pytest
  from random import randint
  import hail
  from hail.genetics import *
  from ..helpers import *
  from hail.utils import FatalError
label_desc: Use image node_id 1 for calling a global function with example usage: test_reference_genome() without return types