code: def test_ndarray_ref():
      scalar = 5.0
      np_scalar = np.array(scalar)
      h_scalar = hl.nd.array(scalar)
      h_np_scalar = hl.nd.array(np_scalar)
  
      assert_evals_to(h_scalar[()], 5.0)
      assert_evals_to(h_np_scalar[()], 5.0)
  
      cube = [[[0, 1], [2, 3]], [[4, 5], [6, 7]]]
      h_cube = hl.nd.array(cube)
      h_np_cube = hl.nd.array(np.array(cube))
      missing = hl.nd.array(hl.missing(hl.tarray(hl.tint32)))
  
      assert_all_eval_to(
          (h_cube[0, 0, 1], 1),
          (h_cube[1, 1, 0], 6),
          (h_np_cube[0, 0, 1], 1),
          (h_np_cube[1, 1, 0], 6),
          (hl.nd.array([[[[1]]]])[0, 0, 0, 0], 1),
          (hl.nd.array([[[1, 2]], [[3, 4]]])[1, 0, 0], 3),
          (missing[1], None),
          (hl.nd.array([1, 2, 3])[hl.missing(hl.tint32)], None),
          (h_cube[0, 0, hl.missing(hl.tint32)], None),
      )
  
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 4 for calling a global function with example usage: test_ndarray_ref() without return types