code: def test_infer_shape(self):
      admat = matrix()
      bdmat = matrix()
      rng = np.random.default_rng(utt.fetch_seed())
      admat_val = rng.random((3, 4)).astype(config.floatX)
      bdmat_val = rng.random((3, 4)).astype(config.floatX)
      self._compile_and_check(
          [admat, bdmat],
          [SoftmaxGrad(axis=-1)(admat, bdmat)],
          [admat_val, bdmat_val],
          SoftmaxGrad,
      )
  
imports: import numpy
  import pytest
  from scipy.special import beta
  from scipy.special import factorial
  from scipy.special import log_softmax
  from scipy.special import poch
  from scipy.special import softmax
  from pytensor.compile.function import function
  from pytensor.configdefaults import config
  from pytensor.graph.replace import vectorize_node
  from pytensor.tensor.blockwise import Blockwise
  from pytensor.tensor.special import LogSoftmax, Softmax, SoftmaxGrad, beta, betaln, factorial, log_softmax, poch, softmax
  from pytensor.tensor.type import matrix, tensor, tensor3, tensor4, vector, vectors
  from tests import unittest_tools
  from tests.tensor.utils import random_ranged
label_desc: Use image node_id 1 for calling the TestSoftmaxGrad obj's underlying member method code with example usage: obj.test_infer_shape() without return types