def _build(self,
             graph,
             edge_model_kwargs=None,
             node_model_kwargs=None,
             global_model_kwargs=None):
    """Connects the GraphIndependent.

    Args:
      graph: A `graphs.GraphsTuple` containing non-`None` edges, nodes and
        globals.
      edge_model_kwargs: Optional keyword arguments to pass to
        the edge block model.
      node_model_kwargs: Optional keyword arguments to pass to
        the node block model.
      global_model_kwargs: Optional keyword arguments to pass to
        the global block model.

    Returns:
      An output `graphs.GraphsTuple` with updated edges, nodes and globals.
    """
    if edge_model_kwargs is None:
      edge_model_kwargs = {}
    if node_model_kwargs is None:
      node_model_kwargs = {}
    if global_model_kwargs is None:
      global_model_kwargs = {}
    return graph.replace(
        edges=self._edge_model(graph.edges, **edge_model_kwargs),
        nodes=self._node_model(graph.nodes, **node_model_kwargs),
        globals=self._global_model(graph.globals, **global_model_kwargs))
Connects the GraphIndependent.

    Args:
      graph: A `graphs.GraphsTuple` containing non-`None` edges, nodes and
        globals.
      edge_model_kwargs: Optional keyword arguments to pass to
        the edge block model.
      node_model_kwargs: Optional keyword arguments to pass to
        the node block model.
      global_model_kwargs: Optional keyword arguments to pass to
        the global block model.

    Returns:
      An output `graphs.GraphsTuple` with updated edges, nodes and globals.
    
graph_nets/modules.py