code: def _elem_to_numpy(elem):
      graph, label = elem
      n = graph["num_nodes"]
      x = graph["node_feat"]
      row, col = graph["edge_index"]
      e = graph["edge_feat"]
      a_e = sparse.edge_index_to_matrix(
          edge_index=np.array((row, col)).T,
          edge_weight=np.ones_like(row),
          edge_features=e,
          shape=(n, n),
      )
      if e is None:
          a = a_e
      else:
          a, e = a_e
  
      return x, a, e, label
  
imports: import numpy
  from spektral.data import Dataset, Graph
  from spektral.utils import sparse
label_desc: Use image node_id 1 for calling a global function with example usage: _elem_to_numpy(elem) and returns: x,  a,  e,  label