class_docstr: An `Op` that produces a sample from a random variable.
  
  This is essentially `RandomFunction`, except that it removes the
  `outtype` dependency and handles shape dimension information more
  directly.
class_docstr_tok: ["An","`","Op","`","that","produces","a","sample","from","a","random","variable",".","This","is","essentially","`","RandomFunction","`",",","except","that","it","removes","the","`","outtype","`","dependency","and","handles","shape","dimension","information","more","directly","."]
docstr: Determine the support shape of a multivariate `RandomVariable`'s output given its parameters.
  
  This does *not* consider the extra dimensions added by the `size` parameter
  or independent (batched) parameters.
  
  When provided, `param_shapes` should be given preference over `[d.shape for d in dist_params]`,
  as it will avoid redundancies in PyTensor shape inference.
  
  Examples
  --------
  Common multivariate `RandomVariable`s derive their support shapes implicitly from the
  last dimension of some of their parameters. For example `multivariate_normal` support shape
  corresponds to the last dimension of the mean or covariance parameters, `support_shape=(mu.shape[-1])`.
  For this case the helper `pytensor.tensor.random.utils.supp_shape_from_ref_param_shape` can be used.
  
  Other variables have fixed support shape such as `support_shape=(2,)` or it is determined by the
  values (not shapes) of some parameters. For instance, a `gaussian_random_walk(steps, size=(2,))`,
  might have `support_shape=(steps,)`.
docstr_tok: ["Determine","the","support","shape","of","a","multivariate","`","RandomVariable","`","'s","output","given","its","parameters",".","This","does","*","not","*","consider","the","extra","dimensions","added","by","the","`","size","`","parameter","or","independent","(","batched",")","parameters",".","When","provided",",","`","param_shapes","`","should","be","given","preference","over","`","[","d.shape","for","d","in","dist_params","]","`",",","as","it","will","avoid","redundancies","in","PyTensor","shape","inference",".","Examples","--","--","--","--","Common","multivariate","`","RandomVariable","`","s","derive","their","support","shapes","implicitly","from","the","last","dimension","of","some","of","their","parameters",".","For","example","`","multivariate_normal","`","support","shape","corresponds","to","the","last","dimension","of","the","mean","or","covariance","parameters",",","`","support_shape=","(","mu.shape","[","-1","]",")","`",".","For","this","case","the","helper","`","pytensor.tensor.random.utils.supp_shape_from_ref_param_shape","`","can","be","used",".","Other","variables","have","fixed","support","shape","such","as","`","support_shape=","(","2",",",")","`","or","it","is","determined","by","the","values","(","not","shapes",")","of","some","parameters",".","For","instance",",","a","`","gaussian_random_walk","(","steps",",","size=","(","2",",",")",")","`",",","might","have","`","support_shape=","(","steps",",",")","`","."]
code: def _supp_shape_from_params(self, dist_params, param_shapes=None):
      """Determine the support shape of a multivariate `RandomVariable`'s output given its parameters.
  
      This does *not* consider the extra dimensions added by the `size` parameter
      or independent (batched) parameters.
  
      When provided, `param_shapes` should be given preference over `[d.shape for d in dist_params]`,
      as it will avoid redundancies in PyTensor shape inference.
  
      Examples
      --------
      Common multivariate `RandomVariable`s derive their support shapes implicitly from the
      last dimension of some of their parameters. For example `multivariate_normal` support shape
      corresponds to the last dimension of the mean or covariance parameters, `support_shape=(mu.shape[-1])`.
      For this case the helper `pytensor.tensor.random.utils.supp_shape_from_ref_param_shape` can be used.
  
      Other variables have fixed support shape such as `support_shape=(2,)` or it is determined by the
      values (not shapes) of some parameters. For instance, a `gaussian_random_walk(steps, size=(2,))`,
      might have `support_shape=(steps,)`.
      """
      raise NotImplementedError(
          "`_supp_shape_from_params` must be implemented for multivariate RVs"
      )
  
imports: from collections.abc import Sequence
  from copy import copy
  from typing import Optional, Union
  import numpy
  import pytensor
  from pytensor.configdefaults import config
  from pytensor.graph.basic import Apply, Variable, equal_computations
  from pytensor.graph.op import Op
  from pytensor.graph.replace import _vectorize_node
  from pytensor.misc.safe_asarray import _asarray
  from pytensor.scalar import ScalarVariable
  from pytensor.tensor.basic import as_tensor_variable, concatenate, constant, get_underlying_scalar_constant_value, get_vector_length, infer_static_shape
  from pytensor.tensor.random.type import RandomGeneratorType, RandomStateType, RandomType
  from pytensor.tensor.random.utils import broadcast_params, normalize_size_param
  from pytensor.tensor.shape import shape_tuple
  from pytensor.tensor.type import TensorType, all_dtypes
  from pytensor.tensor.type_other import NoneConst
  from pytensor.tensor.variable import TensorVariable
label_desc: Use image node_id 2 for calling the RandomVariable obj's underlying member method code with example usage: obj._supp_shape_from_params(dist_params, param_shapes) without return types