code: def test_too_big_graphs_tuple(self):
      with self.subTest("test_too_big_nodes"):
          iterator = utils.dynamically_batch(
              iter([self._global_graph]),
              n_node=15,
              n_edge=50,
              n_graph=10,
          )
          self.assertRaisesRegex(
              RuntimeError,
              "Found graph bigger than batch size.*",
              lambda: next(iterator),
          )
      with self.subTest("test_too_big_edges"):
          iterator = utils.dynamically_batch(
              iter([self._global_graph]),
              n_node=26,
              n_edge=15,
              n_graph=10,
          )
          self.assertRaisesRegex(
              RuntimeError,
              "Found graph bigger than batch size.*",
              lambda: next(iterator),
          )
      with self.subTest("test_too_big_graphs"):
          iterator = utils.dynamically_batch(
              iter([self._global_graph]),
              n_node=50,
              n_edge=50,
              n_graph=1,
          )
          self.assertRaisesRegex(
              ValueError,
              "The number of graphs*",
              lambda: next(iterator),
          )
      with self.subTest("test_too_big_fails_gracefully"):
          # Ensure that dynamically_batch() returns the accumulated batch before
          # raising an exception.
          iterator = utils.dynamically_batch(
              iter([self._global_small_graph, self._global_graph]),
              n_node=15,
              n_edge=15,
              n_graph=10,
          )
          next(iterator)
          self.assertRaisesRegex(
              RuntimeError,
              "Found graph bigger than batch size.*",
              lambda: next(iterator),
          )
  
imports: import functools
  import os
  from absl.testing import absltest
  from absl.testing import parameterized
  import jax
  from jax.lib import xla_bridge
  import jax.numpy
  import jax.tree_util
  from jraph._src import graph
  from jraph._src import utils
  import numpy
label_desc: Use image node_id 3 for calling the DynamicBatchTest obj's underlying member method code with example usage: obj.test_too_big_graphs_tuple() without return types