docstr: Asserts that a transfer in the context is disallowed.
docstr_tok: ["Asserts","that","a","transfer","in","the","context","is","disallowed","."]
code: def assertDisallows(self, func_name):
      """Asserts that a transfer in the context is disallowed."""
      try:
          with self.assertRaises(Exception):
              yield
      except Exception as e:  # pylint: disable=broad-except
          raise RuntimeError(
              f"Expected a transfer to be disallowed while running: {func_name}"
          ) from e
  
imports: import contextlib
  import pickle
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  import jax
  import jax._src.test_util
  import jax.numpy
  from jax import config
label_desc: Use image node_id 3 for calling the TransferGuardTest obj's underlying member method code with example usage: obj.assertDisallows(func_name) without return types