code: def test_function1():
      class Foo(mx.autograd.Function):
          def __init__(self):
              super(Foo, self).__init__()
  
          def forward(self, X):
              return X + 1
  
          def backward(self, dY):
              return dY
  
      with mx.autograd.record():
          X = mx.nd.zeros((3, 4))
          # X.attach_grad()  # uncommenting this line works
          for _ in range(5):
              f = Foo()
              X = f(X)
          X.wait_to_read()
  
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 15 for calling a global function with example usage: test_function1() and returns: unknown, dY