def METHOD_NAME(node_batch, scope):
    messages, mess_dict = [None], {}
    fnode = []
    for x in node_batch:
        fnode.append(x.wid)
        for y in x.neighbors:
            mess_dict[(x.idx, y.idx)] = len(messages)
            messages.append((x, y))
    node_graph = [[] for i in range(len(node_batch))]
    mess_graph = [[] for i in range(len(messages))]
    fmess = [0] * len(messages)
    for x, y in messages[1:]:
        mid1 = mess_dict[(x.idx, y.idx)]
        fmess[mid1] = x.idx
        node_graph[y.idx].append(mid1)
        for z in y.neighbors:
            if z.idx == x.idx:
                continue
            mid2 = mess_dict[(y.idx, z.idx)]
            mess_graph[mid2].append(mid1)
    max_len = max([len(t) for t in node_graph] + [1])
    for t in node_graph:
        pad_len = max_len - len(t)
        t.extend([0] * pad_len)
    max_len = max([len(t) for t in mess_graph] + [1])
    for t in mess_graph:
        pad_len = max_len - len(t)
        t.extend([0] * pad_len)
    mess_graph = torch.LongTensor(mess_graph)
    node_graph = torch.LongTensor(node_graph)
    fmess = torch.LongTensor(fmess)
    fnode = torch.LongTensor(fnode)
    return (fnode, fmess, node_graph, mess_graph, scope), mess_dict