code: def test_hawkesll_backward_single_mark():
      _dtype = np.float32
  
      mu = nd.array([1.5]).astype(_dtype)
      alpha = nd.array([0.2]).astype(_dtype)
      beta = nd.array([1.0]).astype(_dtype)
  
      T, N, K = 7, 1, 1
      lags = nd.array([[6, 7, 8, 3, 2, 1, 7]]).astype(_dtype)
      marks = nd.array([[0, 0, 0, 0, 0, 0, 0]]).astype(np.int32)
      valid_length = nd.array([7]).astype(_dtype)
  
      states = nd.zeros((N, K)).astype(_dtype)
      max_time = nd.ones((N,)).astype(_dtype) * 40
  
      mu.attach_grad()
      beta.attach_grad()
  
      with mx.autograd.record():
          A, _ = nd.contrib.hawkesll(
              mu.tile((N, 1)),
              alpha,
              beta,
              states,
              lags,
              marks,
              valid_length,
              max_time,
          )
  
      A.backward()
  
      assert np.allclose(beta.grad.asnumpy().sum(), -0.05371582)
  
imports: import mxnet
  import numpy
  from mxnet import nd
label_desc: Use image node_id 5 for calling a global function with example usage: test_hawkesll_backward_single_mark() without return types