code: def _assert_all_equal(self, t1, t2, tol=1e-5):
      def eq(x1, x2):
          diff = np.maximum(np.abs(x1 - x2) - tol, 0.0)
          self.assertLessEqual(
              np.sum(diff),
              0.0,
              msg=f"\n{x1}\n !=\n{x2}\n diff:\n{x1-x2}",
          )
  
      fastmath.nested_map_multiarg(eq, t1, t2)
  
imports: import time
  from absl.testing import absltest
  from jax import config
  import numpy
  from trax import fastmath
  from trax import layers
  from trax import optimizers
  from trax import shapes
  from trax.layers import base
  from trax.models.research import terraformer
label_desc: Use image node_id 1 for calling the TrainerTest obj's underlying member method code with example usage: obj._assert_all_equal(t1, t2, tol) without return types