code: def test_cast():
      def testequal(a, hdtype, ndtype):
          ah = hl.eval(hl.nd.array(a, dtype=hdtype))
          an = np.array(a, dtype=ndtype)
  
          assert ah.dtype == an.dtype
  
      def test(a):
          testequal(a, hl.tfloat64, np.float64)
          testequal(a, hl.tfloat32, np.float32)
          testequal(a, hl.tint32, np.int32)
          testequal(a, hl.tint64, np.int64)
  
      test([1, 2, 3])
      test([1, 2, 3.0])
      test([1.0, 2.0, 3.0])
      test([[1, 2], [3, 4]])
  
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 32 for calling a global function with example usage: test_cast() without return types