class_docstr: Packs features into a `graph_nets.graph.GraphsTuple`.
class_docstr_tok: ["Packs","features","into","a","`","graph_nets.graph.GraphsTuple","`","."]
code: def call(self, inputs, **kwargs):
      # Pack the inputs into a graph. Keras may add an extra dimension. Remove it.
      graph = graph_nets.graphs.GraphsTuple(
          n_node=tf.reshape(
              inputs.pop("n_node"), (-1,), name="reshape_n_node"
          ),
          n_edge=tf.reshape(
              inputs.pop("n_edge"), (-1,), name="reshape_n_edge"
          ),
          globals=inputs.pop("globals"),
          edges=inputs.pop("edges"),
          senders=tf.reshape(
              inputs.pop("senders"), (-1,), name="reshape_senders"
          ),
          receivers=tf.reshape(
              inputs.pop("receivers"), (-1,), name="reshape_receivers"
          ),
          nodes=inputs,
      )
      # Transform the graph.
      graph = self.graph_call(graph, **kwargs)
      # Gather up the centered nodes from the graph.
      node_ids = tf.cumsum(graph.n_node) - 1
      return tf.nest.map_structure(
          lambda x: tf.gather(x, node_ids), graph.nodes
      )
  
imports: import functools
  from typing import Dict, Optional, Text
  import graph_nets
  import neural_structured_learning.configs
  import neural_structured_learning.keras
  import neural_structured_learning.lib
  import sonnet.v2
  import tensorflow
label_desc: Use image node_id 2 for calling the NodeGraphModel obj's underlying member method code with example usage: obj.call(inputs) and returns: tf