class_docstr: Node block.
  
  A block that updates the features of each node in batch of graphs based on
  (a subset of) the previous node features, the aggregated features of the
  adjacent edges, and the global features of the corresponding graph.
  
  See https://arxiv.org/abs/1806.01261 for more details.
class_docstr_tok: ["Node","block",".","A","block","that","updates","the","features","of","each","node","in","batch","of","graphs","based","on","(","a","subset","of",")","the","previous","node","features",",","the","aggregated","features","of","the","adjacent","edges",",","and","the","global","features","of","the","corresponding","graph",".","See","https",":","\/\/arxiv.org\/abs\/1806.01261","for","more","details","."]
docstr: Connects the node block.
  
  Args:
    graph: A `graphs.GraphsTuple` containing `Tensor`s, whose individual edges
      features (if `use_received_edges` or `use_sent_edges` is `True`),
      individual nodes features (if `use_nodes` is True) and per graph globals
      (if `use_globals` is `True`) should be concatenable on the last axis.
    node_model_kwargs: Optional keyword arguments to pass to the `node_model`.
  
  Returns:
    An output `graphs.GraphsTuple` with updated nodes.
docstr_tok: ["Connects","the","node","block",".","Args",":","graph",":","A","`","graphs.GraphsTuple","`","containing","`","Tensor","`","s",",","whose","individual","edges","features","(","if","`","use_received_edges","`","or","`","use_sent_edges","`","is","`","True","`",")",",","individual","nodes","features","(","if","`","use_nodes","`","is","True",")","and","per","graph","globals","(","if","`","use_globals","`","is","`","True","`",")","should","be","concatenable","on","the","last","axis",".","node_model_kwargs",":","Optional","keyword","arguments","to","pass","to","the","`","node_model","`",".","Returns",":","An","output","`","graphs.GraphsTuple","`","with","updated","nodes","."]
code: def _build(self, graph, node_model_kwargs=None):
      """Connects the node block.
  
      Args:
        graph: A `graphs.GraphsTuple` containing `Tensor`s, whose individual edges
          features (if `use_received_edges` or `use_sent_edges` is `True`),
          individual nodes features (if `use_nodes` is True) and per graph globals
          (if `use_globals` is `True`) should be concatenable on the last axis.
        node_model_kwargs: Optional keyword arguments to pass to the `node_model`.
  
      Returns:
        An output `graphs.GraphsTuple` with updated nodes.
      """
      if node_model_kwargs is None:
          node_model_kwargs = {}
  
      nodes_to_collect = []
  
      if self._use_received_edges:
          nodes_to_collect.append(
              self._received_edges_aggregator(graph)
          )
  
      if self._use_sent_edges:
          nodes_to_collect.append(self._sent_edges_aggregator(graph))
  
      if self._use_nodes:
          _validate_graph(graph, (NODES,), "when use_nodes == True")
          nodes_to_collect.append(graph.nodes)
  
      if self._use_globals:
          # The hint will be an integer if the graph has node features and the total
          # number of nodes is known at tensorflow graph definition time, or None
          # otherwise.
          num_nodes_hint = _get_static_num_nodes(graph)
          nodes_to_collect.append(
              broadcast_globals_to_nodes(
                  graph, num_nodes_hint=num_nodes_hint
              )
          )
  
      collected_nodes = tf.concat(nodes_to_collect, axis=-1)
      updated_nodes = self._node_model(
          collected_nodes, **node_model_kwargs
      )
      return graph.replace(nodes=updated_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 NodeBlock obj's underlying member method code with example usage: obj._build(graph, node_model_kwargs) and returns: graph