code: def test_ndarray_emitter_extract():
      np_mat = np.array([0, 1, 2, 1, 0])
      mat = hl.nd.array(np_mat)
      mapped_mat = mat.map(lambda x: hl.array([3, 4, 5])[hl.int(x)])
      assert hl.eval(hl.range(5).map(lambda i: mapped_mat[i])) == [
          3,
          4,
          5,
          4,
          3,
      ]
  
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 29 for calling a global function with example usage: test_ndarray_emitter_extract() without return types