code: def _get_random_graph(max_n_graph=10):
      n_graph = np.random.randint(1, max_n_graph + 1)
      n_node = np.random.randint(0, 10, n_graph)
      n_edge = np.random.randint(0, 20, n_graph)
      # We cannot have any edges if there are no nodes.
      n_edge[n_node == 0] = 0
  
      senders = []
      receivers = []
      offset = 0
      for n_node_in_graph, n_edge_in_graph in zip(n_node, n_edge):
          if n_edge_in_graph != 0:
              senders += list(
                  np.random.randint(0, n_node_in_graph, n_edge_in_graph)
                  + offset
              )
              receivers += list(
                  np.random.randint(0, n_node_in_graph, n_edge_in_graph)
                  + offset
              )
          offset += n_node_in_graph
  
      return graph.GraphsTuple(
          n_node=jnp.asarray(n_node),
          n_edge=jnp.asarray(n_edge),
          nodes=jnp.asarray(np.random.random(size=(np.sum(n_node), 4))),
          edges=jnp.asarray(np.random.random(size=(np.sum(n_edge), 3))),
          globals=jnp.asarray(np.random.random(size=(n_graph, 5))),
          senders=jnp.asarray(senders),
          receivers=jnp.asarray(receivers),
      )
  
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 1 for calling a global function with example usage: _get_random_graph(max_n_graph) and returns: graph