code: def test_unary_func():
      def check_unary_func(x):
          f_exp = lambda x: nd.exp(x)
          f_exp_grad = lambda x: [nd.exp(x)]
          autograd_assert(x, func=f_exp, grad_func=f_exp_grad)
          f_half = lambda x: x / 2
          f_half_grad = lambda x: [nd.ones(x.shape) * 0.5]
          autograd_assert(x, func=f_half, grad_func=f_half_grad)
          f_square = lambda x: x**2
          f_square_grad = lambda x: [2 * x]
          autograd_assert(x, func=f_square, grad_func=f_square_grad)
  
      uniform = nd.uniform(shape=(4, 5))
      stypes = ["default", "row_sparse", "csr"]
      with environment("MXNET_STORAGE_FALLBACK_LOG_VERBOSE", "0"):
          for stype in stypes:
              check_unary_func(uniform.tostype(stype))
  
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 4 for calling a global function with example usage: test_unary_func() without return types