code: def _test_conditional(
      self,
      conditional_transform_factory,
      context_dim=3,
      event_dim=1,
      **kwargs,
  ):
      def transform_factory(input_dim, context_dim=context_dim):
          z = torch.rand(1, context_dim)
          cond_transform = conditional_transform_factory(
              input_dim, context_dim
          )
          transform = cond_transform.condition(z)
  
          # A bit of a hack since conditioned transforms don't expose .parameters()
          transform.parameters = lambda: cond_transform.parameters()
  
          return transform
  
      self._test(transform_factory, event_dim=event_dim, **kwargs)
  
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 7 for calling the TransformTests obj's underlying member method code with example usage: obj._test_conditional(conditional_transform_factory, context_dim, event_dim) and returns: transform