code: def test_dtypes():
      def f(x):
          return np.real(np.sum(x**2))
  
      # Array y with dtype np.float32
      y = np.random.randn(10, 10).astype(np.float32)
      assert grad(f)(y).dtype.type is np.float32
  
      y = np.random.randn(10, 10).astype(np.float16)
      assert grad(f)(y).dtype.type is np.float16
  
      y = np.random.randn(10, 10).astype(np.longdouble)
      grad(f)(y)
  
      y = np.random.randn(10, 10).astype(np.clongdouble)
      grad(f)(y)
  
imports: from __future__ import absolute_import
  from builtins import range
  import warnings
  from functools import partial
  import autograd.numpy
  import autograd.numpy.random
  from autograd.test_util import check_grads, check_equivalent
  from autograd.tracer import primitive, isbox
  from autograd import grad, elementwise_grad, jacobian, value_and_grad, hessian_tensor_product, hessian, make_hvp, tensor_jacobian_product, checkpoint, make_jvp, make_ggnvp, grad_and_aux
label_desc: Use image node_id 21 for calling a global function with example usage: test_dtypes() and returns: np