code: def test_lower_cholesky_transform(transform, batch_shape, dim):
      shape = batch_shape + (dim, dim)
      x = torch.randn(shape)
      y = transform(x)
      assert y.shape == shape
      x2 = transform.inv(y)
      assert x2.shape == shape
      y2 = transform(x2)
      assert y2.shape == shape
      assert_close(y, y2)
  
imports: import operator
  from functools import partial, reduce
  from unittest import TestCase
  import pytest
  import torch
  import pyro.distributions
  import pyro.distributions.transforms
  from pyro.distributions import constraints
  from tests.common import assert_close
label_desc: Use image node_id 2 for calling a global function with example usage: test_lower_cholesky_transform(transform, batch_shape, dim) without return types