class_docstr: Agregates sent or received edges into the corresponding nodes.
class_docstr_tok: ["Agregates","sent","or","received","edges","into","the","corresponding","nodes","."]
code: def _build(self, graph):
      _validate_graph(
          graph,
          (
              EDGES,
              SENDERS,
              RECEIVERS,
          ),
          additional_message="when aggregating from edges.",
      )
      # If the number of nodes are known at graph construction time (based on the
      # shape) then use that value to make the model compatible with XLA/TPU.
      if (
          graph.nodes is not None
          and graph.nodes.shape.as_list()[0] is not None
      ):
          num_nodes = graph.nodes.shape.as_list()[0]
      else:
          num_nodes = tf.reduce_sum(graph.n_node)
      indices = (
          graph.senders if self._use_sent_edges else graph.receivers
      )
      return self._reducer(graph.edges, indices, num_nodes)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from graph_nets import _base
  from graph_nets import graphs
  from graph_nets import utils_tf
  import tensorflow
label_desc: Use image node_id 2 for calling the _EdgesToNodesAggregator obj's underlying member method code with example usage: obj._build(graph) and returns: self