def METHOD_NAME(x_shape, mapping):
    transform = mapping(constraints.corr_cholesky)
    x = torch.randn(x_shape, requires_grad=True).clamp(-2, 2)
    y = transform(x)
    # test codomain
    assert (transform.codomain.check(y) == 1).all()
    # test inv
    z = transform.inv(y)
    assert_tensors_equal(x, z, prec=1e-4)
    # test domain
    assert (transform.domain.check(z) == 1).all()
    # test log_abs_det_jacobian
    log_det = transform.log_abs_det_jacobian(x, y)
    assert log_det.shape == x_shape[:-1]