code: def model(y):
      d = y.shape[1]
      N = y.shape[0]
      options = dict(dtype=y.dtype, device=y.device)
      # Vector of variances for each of the d variables
      theta = pyro.sample(
          "theta", dist.HalfCauchy(torch.ones(d, **options))
      )
      # Lower cholesky factor of a correlation matrix
      concentration = torch.ones(
          (), **options
      )  # Implies a uniform distribution over correlation matrices
      L_omega = pyro.sample(
          "L_omega", dist.LKJCholesky(d, concentration)
      )
      # Lower cholesky factor of the covariance matrix
      L_Omega = torch.mm(torch.diag(theta.sqrt()), L_omega)
      # For inference with SVI, one might prefer to use torch.bmm(theta.sqrt().diag_embed(), L_omega)
  
      # Vector of expectations
      mu = torch.zeros(d, **options)
  
      with pyro.plate("observations", N):
          obs = pyro.sample(
              "obs",
              dist.MultivariateNormal(mu, scale_tril=L_Omega),
              obs=y,
          )
      return obs
  
file_path: pyro/examples/lkj.py
imports: import argparse
  import torch
  import pyro
  import pyro.distributions
  from pyro.infer.mcmc import NUTS
  from pyro.infer.mcmc.api import MCMC
label_desc: Use image node_id 1 for calling a global function with example usage: model(y) and returns: obs