code: def test_ndarray_solve_triangular():
      a = hl.nd.array([[1, 1], [0, 1]])
      b = hl.nd.array([2, 1])
      b2 = hl.nd.array([[11, 5], [6, 3]])
  
      a_low = hl.nd.array([[4, 0], [2, 1]])
      b_low = hl.nd.array([4, 5])
  
      a_sing = hl.nd.array([[0, 1], [0, 1]])
      b_sing = hl.nd.array([2, 2])
  
      assert np.allclose(
          hl.eval(hl.nd.solve_triangular(a, b)), np.array([1.0, 1.0])
      )
      assert np.allclose(
          hl.eval(hl.nd.solve_triangular(a, b2)),
          np.array([[5.0, 2.0], [6.0, 3.0]]),
      )
      assert np.allclose(
          hl.eval(hl.nd.solve_triangular(a_low, b_low, True)),
          np.array([[1.0, 3.0]]),
      )
      with pytest.raises(HailUserError) as exc:
          hl.eval(hl.nd.solve_triangular(a_sing, b_sing))
      assert "singular" in str(exc.value), str(exc.value)
  
imports: import math
  import numpy
  import re
  from ..helpers import *
  import pytest
  from hail.utils.java import FatalError, HailUserError
label_desc: Use image node_id 23 for calling a global function with example usage: test_ndarray_solve_triangular() without return types