code: def test_gradient():
      x = mx.nd.ones((1,))
      x.attach_grad()
  
      with mx.autograd.record():
          z = mx.nd.elemwise_add(mx.nd.exp(x), x)
      (dx,) = mx.autograd.grad(z, [x], create_graph=True)
      assert abs(dx.asscalar() - 3.71828175) < 1e-7
      dx.backward()
      assert abs(x.grad.asscalar() - 2.71828175) < 1e-7
  
imports: import functools
  import mxnet.ndarray
  from mxnet.ndarray import zeros_like
  from mxnet.autograd import *
  from mxnet.test_utils import *
  from common import xfail_when_nonstandard_decimal_separator
  from mxnet.test_utils import environment
  import pytest
label_desc: Use image node_id 21 for calling a global function with example usage: test_gradient() without return types