docstr: Helper method: calculates conv transpose via grad for testing.
  
  Adapted from `jax.tests.lax_test`.
docstr_tok: ["Helper","method",":","calculates","conv","transpose","via","grad","for","testing",".","Adapted","from","`","jax.tests.lax_test","`","."]
code: def _conv_transpose_circular_via_grad(
      cls, lhs, params, strides, padding, dimension_numbers
  ):
      """Helper method: calculates conv transpose via grad for testing.
  
      Adapted from `jax.tests.lax_test`.
      """
      rhs = params[0]
      rhs = jnp.swapaxes(
          rhs,
          dimension_numbers[1].index("O"),
          dimension_numbers[1].index("I"),
      )
      rhs = jnp.flip(rhs, dimension_numbers[1].index("H"))
      assert len(lhs.shape) == len(rhs.shape)
      nspatial = len(lhs.shape) - 2
      dn = lax.conv_dimension_numbers(
          lhs.shape, rhs.shape, dimension_numbers
      )
      in_shape = np.take(lhs.shape, dn.lhs_spec)
      in_sdims = in_shape[2:]
      k_shape = np.take(rhs.shape, dn.rhs_spec)
      o_sdims = [in_sdims[i] * strides[i] for i in range(nspatial)]
      o_shape = [in_shape[0], k_shape[1]] + o_sdims
      out_spec_inv = [
          x[0]
          for x in sorted(enumerate(dn.out_spec), key=lambda x: x[1])
      ]
      o_layout = np.take(np.array(o_shape), out_spec_inv)
      placeholder = jnp.ones(o_layout, lhs.dtype)
  
      _, apply_fn, _ = stax.Conv(
          out_chan=rhs.shape[dimension_numbers[1].index("I")],
          filter_shape=(rhs.shape[dimension_numbers[1].index("H")],),
          strides=strides,
          padding=padding,
          dimension_numbers=dimension_numbers,
          parameterization="standard",
      )
      conv = lambda x: apply_fn((rhs, 0.0), x)
      _, g = vjp(conv, placeholder)
      return g(lhs)[0]
  
imports: import itertools
  import random
  import string
  import time
  from absl.testing import absltest
  from jax import default_backend
  from jax import jit
  from jax import lax
  from jax import random
  from jax import vjp
  from jax import config
  import jax.numpy
  import more_itertools
  import neural_tangents
  from neural_tangents import stax
  from neural_tangents._src.empirical import _DEFAULT_TESTING_NTK_IMPLEMENTATION
  from neural_tangents._src.utils import utils
  from tests import test_utils
  import numpy
label_desc: Use image node_id 2 for calling the ConvTransposeTest obj's underlying member method code with example usage: obj._conv_transpose_circular_via_grad(cls, lhs, params, strides, padding, dimension_numbers) and returns: g