def METHOD_NAME(self, graph, seed=717, train_size=0.7, val_size=0.1):
    """split the dataset into training set, validation set and testing set"""
    assert 0 <= train_size + val_size <= 1, (
        "The sum of valid training set size and validation set size "
        "must between 0 and 1 (inclusive)."
    )
    num_edges = graph.num_edges(etype="forward")
    index = np.arange(num_edges)
    index = np.random.RandomState(seed).permutation(index)
    train_idx = index[: int(train_size * num_edges)]
    val_idx = index[num_edges - int(val_size * num_edges) :]
    test_idx = index[
        int(train_size * num_edges) : num_edges - int(val_size * num_edges)
    ]
    train_mask = np.zeros(num_edges, dtype=np.bool)
    val_mask = np.zeros(num_edges, dtype=np.bool)
    test_mask = np.zeros(num_edges, dtype=np.bool)
    train_mask[train_idx] = True
    val_mask[val_idx] = True
    test_mask[test_idx] = True
    graph.edges["forward"].data["train_mask"] = th.tensor(train_mask)
    graph.edges["forward"].data["val_mask"] = th.tensor(val_mask)
    graph.edges["forward"].data["test_mask"] = th.tensor(test_mask)
    graph.edges["backward"].data["train_mask"] = th.tensor(train_mask)
    graph.edges["backward"].data["val_mask"] = th.tensor(val_mask)
    graph.edges["backward"].data["test_mask"] = th.tensor(test_mask)