code: def jacobian_autograd(x, y):
      jac = []
      for i in range(y.shape[1]):
          with autograd.record():
              yi = y[:, i]
          dyidx = autograd.grad(yi, [x], create_graph=True)[0]
          jac += [nd.expand_dims(dyidx, 1)]
      return nd.concatenate(jac, 1)
  
file_path: gluonts/test/mx/distribution/test_flows.py
imports: from functools import partial
  import numpy
  import pytest
  import mxnet.ndarray
  from mxnet import autograd
  from gluonts.mx.distribution.iresnet import iresnet, log_abs_det
label_desc: Use image node_id 4 for calling a global function with example usage: jacobian_autograd(x, y) and returns: nd