code: def _get_random_graph(
      max_n_graph=10,
      include_node_features=True,
      include_edge_features=True,
      include_globals=True,
  ):
      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
      if include_globals:
          global_features = jnp.asarray(
              np.random.random(size=(n_graph, 5))
          )
      else:
          global_features = None
      if include_node_features:
          nodes = jnp.asarray(
              np.random.random(size=(np.sum(n_node), 4))
          )
      else:
          nodes = None
  
      if include_edge_features:
          edges = jnp.asarray(
              np.random.random(size=(np.sum(n_edge), 3))
          )
      else:
          edges = None
      return graph.GraphsTuple(
          n_node=jnp.asarray(n_node),
          n_edge=jnp.asarray(n_edge),
          nodes=nodes,
          edges=edges,
          globals=global_features,
          senders=jnp.asarray(senders),
          receivers=jnp.asarray(receivers),
      )
  
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 1 for calling a global function with example usage: _get_random_graph(max_n_graph, include_node_features, include_edge_features, include_globals) and returns: graph