code: def test_ndarray_map1():
      a = hl.nd.array([[2, 3, 4], [5, 6, 7]])
      b = hl.map(lambda x: -x, a)
      b2 = b.map(lambda x: x * x)
      c = hl.map(lambda x: True, a)
  
      assert_ndarrays_eq(
          (b, [[-2, -3, -4], [-5, -6, -7]]),
          (b2, [[4, 9, 16], [25, 36, 49]]),
          (c, [[True, True, True], [True, True, True]]),
      )
  
      assert (
          hl.eval(
              hl.missing(hl.tndarray(hl.tfloat, 1)).map(lambda x: x * 2)
          )
          is None
      )
  
      # NDArrays don't correctly support elements that contain pointers at the moment.
      # s = hl.nd.array(["hail", "is", "great"])
      # s_lens = s.map(lambda e: hl.len(e))
      # assert np.array_equal(hl.eval(s_lens), np.array([4, 2, 5]))
  
      structs = hl.nd.array(
          [hl.struct(x=5, y=True), hl.struct(x=9, y=False)]
      )
      assert np.array_equal(
          hl.eval(structs.map(lambda e: e.y)), np.array([True, False])
      )
  
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 11 for calling a global function with example usage: test_ndarray_map1() without return types