code: def test_argsort_grad():
      rng = np.random.default_rng(seed=utt.fetch_seed())
      # Testing grad of argsort
      data = rng.random((2, 3)).astype(pytensor.config.floatX)
      utt.verify_grad(lambda x: argsort(x, axis=-1), [data])
  
      data = rng.random((2, 3, 4, 5)).astype(pytensor.config.floatX)
      utt.verify_grad(lambda x: argsort(x, axis=-3), [data])
  
      data = rng.random((2, 3, 3)).astype(pytensor.config.floatX)
      utt.verify_grad(lambda x: argsort(x, axis=2), [data])
  
imports: from functools import reduce
  from itertools import chain, product
  import numpy
  import pytest
  import pytensor
  from pytensor.compile.mode import Mode
  from pytensor.tensor.sort import ArgSortOp, SortOp, TopKOp, argsort, argtopk, sort, topk, topk_and_argtopk
  from pytensor.tensor.type import dmatrix, dvector, float_dtypes, integer_dtypes, lscalar, matrix, scalar, tensor, vector
  from tests import unittest_tools
label_desc: Use image node_id 3 for calling a global function with example usage: test_argsort_grad() without return types