code: def test_custom_reference_read_write():
      hl.ReferenceGenome("dk", ["hello"], {"hello": 123})
      ht = hl.utils.range_table(5)
      ht = ht.key_by(locus=hl.locus("hello", ht.idx + 1, "dk"))
      with hl.TemporaryDirectory(ensure_exists=False) as foo:
          ht.write(foo)
          expected = ht
          actual = hl.read_table(foo)
          assert actual._same(expected)
  
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 6 for calling a global function with example usage: test_custom_reference_read_write() without return types