code: def _single_data_dict_to_networkx(data_dict):
      graph_nx = nx.OrderedMultiDiGraph()
      if data_dict["nodes"].size > 0:
          for i, x in enumerate(data_dict["nodes"]):
              graph_nx.add_node(i, features=x)
  
      if data_dict["edges"].size > 0:
          edge_data = zip(
              data_dict["senders"],
              data_dict["receivers"],
              [{"features": x} for x in data_dict["edges"]],
          )
          graph_nx.add_edges_from(edge_data)
      graph_nx.graph["features"] = data_dict["globals"]
  
      return graph_nx
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import itertools
  from absl.testing import parameterized
  from graph_nets import utils_np
  from graph_nets.tests import test_utils
  import networkx
  import numpy
  from six.moves import range
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: _single_data_dict_to_networkx(data_dict) and returns: graph_nx