code: def test_graphnetwork_attention_error(self):
      with self.assertRaisesRegex(
          ValueError,
          (
              "attention_logit_fn and attention_reduce_fn "
              "must both be supplied."
          ),
      ):
          models.GraphNetwork(
              update_edge_fn=None,
              update_node_fn=None,
              attention_logit_fn=lambda x: x,
              attention_reduce_fn=None,
          )
      with self.assertRaisesRegex(
          ValueError,
          (
              "attention_logit_fn and attention_reduce_fn "
              "must both be supplied."
          ),
      ):
          models.GraphNetwork(
              update_edge_fn=None,
              update_node_fn=None,
              attention_logit_fn=None,
              attention_reduce_fn=lambda x: x,
          )
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  import jax
  import jax.numpy
  import jax.tree_util
  from jraph._src import graph
  from jraph._src import models
  from jraph._src import utils
  import numpy
label_desc: Use image node_id 6 for calling the ModelsTest obj's underlying member method code with example usage: obj.test_graphnetwork_attention_error() without return types