code: def test_sparseblockgemv_grad_1(self):
      # Test that we correctly handle cases where dimensions are 1.
      h_val = randn(1, 1, 1).astype("float32")
      iIdx_val = np.random.permutation(1)[:1][None, :]
      oIdx_val = np.random.permutation(1)[:1][None, :]
      W_val = randn(1, 1, 1, 1).astype("float32")
      b_val = randn(1, 1).astype("float32")
  
      iIdx = theano.tensor.constant(iIdx_val)
      oIdx = theano.tensor.constant(oIdx_val)
  
      def metaop(b, h, W):
          return sparse_block_dot(W, h, iIdx, b, oIdx)
  
      def op(b, h, W):
          return self.gemv_op(b.take(oIdx, axis=0), W, h, iIdx, oIdx)
  
      utt.verify_grad(metaop, [b_val, h_val, W_val], mode=self.mode)
      utt.verify_grad(op, [b_val, h_val, W_val], mode=self.mode)
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  from numpy.random import randn
  import theano
  from theano import tensor
  import theano.tests.unittest_tools
  from theano.tensor.nnet.blocksparse import sparse_block_dot, sparse_block_gemv, sparse_block_outer, SparseBlockGemv, SparseBlockOuter
label_desc: Use image node_id 12 for calling the BlockSparse_Gemv_and_Outer obj's underlying member method code with example usage: obj.test_sparseblockgemv_grad_1() and returns: sparse_block_dot, self