code: def test_local_to_global_out_of_bounds():
      local_alleles = [0, 2]
      lad = [1, 9]
      lpl = [1001, 0, 1002]
  
      with pytest.raises(
          hl.utils.HailUserError,
          match="local_to_global: local allele of 2 out of bounds given n_total_alleles of 2",
      ):
          assert hl.eval(
              hl.vds.local_to_global(
                  lad, local_alleles, 2, 0, number="R"
              )
          ) == [1, 0]
  
      with pytest.raises(
          hl.utils.HailUserError,
          match="local_to_global: local allele of 2 out of bounds given n_total_alleles of 2",
      ):
          assert hl.eval(
              hl.vds.local_to_global(
                  lpl, local_alleles, 2, 10001, number="G"
              )
          ) == [
              1001,
              10001,
              0,
              10001,
              10001,
              1002,
          ]
  
imports: import pytest
  import hail
label_desc: Use image node_id 6 for calling a global function with example usage: test_local_to_global_out_of_bounds() without return types