def inductive_split(g):
    """Split the graph into training graph, validation graph, and test graph by training
    and validation masks.  Suitable for inductive models."""
    train_g = g.subgraph(g.ndata["train_mask"])
    val_g = g.subgraph(g.ndata["train_mask"] | g.ndata["val_mask"])
    test_g = g
    return train_g, val_g, test_g
Split the graph into training graph, validation graph, and test graph by training
    and validation masks.  Suitable for inductive models.
examples/pytorch/graphsage/load_graph.py