class_docstr: Return a sparse matrix having random values from a multinomial
  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 type vector or scalar representing the number of
            experiment for each row. If `n` is a scalar, it will be
            used for each row.
  :param p: Sparse matrix of probability where each row is a probability
            vector representing the probability of success. N.B. Each row
            must sum to one.
  
  :return: A sparse matrix of random integers from a multinomial density
           for each row.
  
  :note: It will works only if `p` have csr format.
class_docstr_tok: ["Return","a","sparse","matrix","having","random","values","from","a","multinomial","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","type","vector","or","scalar","representing","the","number","of","experiment","for","each","row",".","If","`","n","`","is","a","scalar",",","it","will","be","used","for","each","row",".",":","param","p",":","Sparse","matrix","of","probability","where","each","row","is","a","probability","vector","representing","the","probability","of","success",".","N.B",".","Each","row","must","sum","to","one",".",":","return",":","A","sparse","matrix","of","random","integers","from","a","multinomial","density","for","each","row",".",":","note",":","It","will","works","only","if","`","p","`","have","csr","format","."]
code: def infer_shape(self, fgraph, node, ins_shapes):
      return [ins_shapes[1]]
  
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 4 for calling the Multinomial obj's underlying member method code with example usage: obj.infer_shape(fgraph, node, ins_shapes) and returns: list