code: def generate_random_data_dict(
      node_shape,
      edge_shape,
      globals_shape,
      num_nodes_range=(15, 20),
      num_edges_range=(30, 35),
  ):
      num_nodes = np.random.randint(*num_nodes_range)
      num_edges = np.random.randint(*num_edges_range)
  
      return {
          "nodes": np.random.normal(size=(num_nodes,) + node_shape),
          "edges": np.random.normal(size=(num_edges,) + edge_shape),
          "globals": np.random.normal(size=globals_shape),
          "senders": np.random.randint(num_nodes, size=num_edges),
          "receivers": np.random.randint(num_nodes, size=num_edges),
          "n_node": num_nodes,
          "n_edge": num_edges,
      }
  
file_path: graph_nets/graph_nets/tests/test_utils.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import contextlib
  import itertools
  from graph_nets import graphs
  from graph_nets import utils_np
  import numpy
  import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: generate_random_data_dict(node_shape, edge_shape, globals_shape, num_nodes_range, num_edges_range) and returns: dict