code: def test_einsum_kpmurphy_example(self):
      # code from an email with @murphyk
      N = 2
      C = 3
      D = 4
      K = 5
      T = 6
      r = self.rng()
      S = r.randn(N, T, K)
      W = r.randn(K, D)
      V = r.randn(D, C)
      L = np.zeros((N, C))
      for n in range(N):
          for c in range(C):
              s = 0
              for d in range(D):
                  for k in range(K):
                      for t in range(T):
                          s += S[n, t, k] * W[k, d] * V[d, c]
              L[n, c] = s
  
      path = jnp.einsum_path(
          "ntk,kd,dc->nc", S, W, V, optimize="optimal"
      )[0]
      rtol = 1e-2 if jtu.device_under_test() == "tpu" else None
      self.assertAllClose(
          L,
          jnp.einsum("ntk,kd,dc->nc", S, W, V, optimize=path),
          check_dtypes=False,
          rtol=rtol,
      )
  
imports: from collections import defaultdict
  import itertools
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from trax.tf_numpy.jax_tests.config import config
  import trax.tf_numpy.jax_tests.test_util
  import trax.tf_numpy.numpy
label_desc: Use image node_id 32 for calling the EinsumTest obj's underlying member method code with example usage: obj.test_einsum_kpmurphy_example() without return types