code: def test_lower_cholesky_transform(batch_shape, dim):
      t = torch.distributions.transform_to(
          torch.distributions.constraints.lower_cholesky
      )
      x = torch.randn(batch_shape + (dim, dim))
      y = t(x)
      assert y.shape == x.shape
      actual = torch.linalg.cholesky(y.matmul(y.transpose(-1, -2)))
      assert_close(actual, y)
      x2 = t.inv(y)
      assert x2.shape == x.shape
      y2 = t(x2)
      assert_close(y2, y)
  
imports: import pytest
  import torch
  import pyro.distributions
  from tests.common import assert_close, requires_cuda
label_desc: Use image node_id 3 for calling a global function with example usage: test_lower_cholesky_transform(batch_shape, dim) without return types