code: def test_real_type():
      fun = lambda x: np.sum(np.real(x))
      df = grad(fun)
      assert np.isrealobj(df(2.0))
      assert np.iscomplexobj(df(1.0j))
  
file_path: autograd/tests/test_complex.py
imports: from __future__ import absolute_import
  import autograd.numpy
  import autograd.numpy.random
  from autograd.test_util import check_grads
  from autograd import grad
label_desc: Use image node_id 1 for calling a global function with example usage: test_real_type() without return types