code: def test_policy_with_interceptor(self):
      sidechannel = []
  
      def my_interceptor(next_f, args, kwargs, context):
          sidechannel.append(context)
          return next_f(*args, **kwargs)
  
      # We need this to make sure that the mixed precision interceptor is
      # installed when we call set_policy (this only happens the first call).
      mixed_precision.reset_thread_local_state_for_test()
  
      policy = jmp.get_policy("p=f16,c=f32,o=f16")
      with module.intercept_methods(my_interceptor):
          mixed_precision.set_policy(OuterModule, policy)
          x = OuterModule()()
          self.assertEqual(x.dtype, jnp.float16)
      # Outer.init, Outer.call, Inner.init, Inner.call
      self.assertLen(sidechannel, 4)
  
imports: import importlib
  from typing import Optional
  from absl.testing import absltest
  from haiku._src import base
  from haiku._src import conv
  from haiku._src import mixed_precision
  from haiku._src import module
  from haiku._src import test_utils
  from haiku._src import transform
  import jax
  import jax.numpy
  import jmp
label_desc: Use image node_id 15 for calling the MixedPrecisionTest obj's underlying member method code with example usage: obj.test_policy_with_interceptor() and returns: next_f