code: def test_numpy_backend_delegation(self):
      # Assert that we are getting JAX's numpy backend.
      backend = fastmath.backend()
      numpy = fastmath.numpy
      self.assertEqual(jnp, backend["np"])
  
      # Assert that `numpy` calls the appropriate gin configured functions and
      # properties.
      self.assertTrue(numpy.isinf(numpy.inf))
      self.assertEqual(jnp.isinf, numpy.isinf)
      self.assertEqual(jnp.inf, numpy.inf)
  
      # Assert that we will now get the pure numpy backend.
  
      self.override_gin("backend.name = 'numpy'")
  
      backend = fastmath.backend()
      numpy = fastmath.numpy
      self.assertEqual(onp, backend["np"])
  
      # Assert that `numpy` calls the appropriate gin configured functions and
      # properties.
      self.assertTrue(numpy.isinf(numpy.inf))
      self.assertEqual(onp.isinf, numpy.isinf)
      self.assertEqual(onp.inf, numpy.inf)
  
imports: import collections
  from absl.testing import parameterized
  import gin
  import jax.numpy
  import numpy
  from tensorflow import test
  from trax import fastmath
label_desc: Use image node_id 5 for calling the BackendTest obj's underlying member method code with example usage: obj.test_numpy_backend_delegation() without return types