code: def test_batchnorm(self):
      # Need to make moving average statistics non-zeros/ones and set to eval so inverse is valid
      # (see the docs about the differing behaviour of BatchNorm in train and eval modes)
      def transform_factory(input_dim):
          transform = T.batchnorm(input_dim)
          transform._inverse(
              torch.normal(
                  torch.arange(0.0, input_dim),
                  torch.arange(1.0, 1.0 + input_dim) / input_dim,
              )
          )
          transform.eval()
          return transform
  
      self._test(transform_factory)
  
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 10 for calling the TransformTests obj's underlying member method code with example usage: obj.test_batchnorm() and returns: transform