class_docstr: Return a sparse matrix having random values from a binomial
  density having number of experiment `n` and probability of success
  `p`.
  
  WARNING: This Op is NOT deterministic, as calling it twice with the
  same inputs will NOT give the same result. This is a violation of
  PyTensor's contract for Ops
  
  :param n: Tensor scalar representing the number of experiment.
  :param p: Tensor scalar representing the probability of success.
  :param shape: Tensor vector for the output shape.
  
  :return: A sparse matrix of integers representing the number
           of success.
class_docstr_tok: ["Return","a","sparse","matrix","having","random","values","from","a","binomial","density","having","number","of","experiment","`","n","`","and","probability","of","success","`","p","`",".","WARNING",":","This","Op","is","NOT","deterministic",",","as","calling","it","twice","with","the","same","inputs","will","NOT","give","the","same","result",".","This","is","a","violation","of","PyTensor","'s","contract","for","Ops",":","param","n",":","Tensor","scalar","representing","the","number","of","experiment",".",":","param","p",":","Tensor","scalar","representing","the","probability","of","success",".",":","param","shape",":","Tensor","vector","for","the","output","shape",".",":","return",":","A","sparse","matrix","of","integers","representing","the","number","of","success","."]
code: def grad(self, inputs, gout):
      (n, p, shape) = inputs
      (gz,) = gout
      comment_n = "No gradient exists for the number of samples in class\
                       Binomial of pytensor/sparse/sandbox/sp2.py"
      comment_p = "No gradient exists for the prob of success in class\
                       Binomial of pytensor/sparse/sandbox/sp2.py"
      return [
          pytensor.gradient.grad_undefined(
              op=self, x_pos=0, x=n, comment=comment_n
          ),
          pytensor.gradient.grad_undefined(
              op=self, x_pos=1, x=p, comment=comment_p
          ),
          pytensor.gradient.disconnected_type(),
      ]
  
imports: import numpy
  import scipy.sparse
  import pytensor
  from pytensor import tensor
  from pytensor.graph.basic import Apply
  from pytensor.graph.op import Op
  from pytensor.sparse.basic import Remove0, SparseTensorType, _is_sparse, as_sparse_variable, remove0
  from pytensor.tensor.type import discrete_dtypes, float_dtypes
label_desc: Use image node_id 5 for calling the Binomial obj's underlying member method code with example usage: obj.grad(inputs, gout) and returns: list