def METHOD_NAME(g, bg):
    for ntype in bg.srctypes:
        for key in g.nodes[ntype].data:
            assert F.array_equal(
                bg.srcnodes[ntype].data[key],
                F.gather_row(
                    g.nodes[ntype].data[key],
                    bg.srcnodes[ntype].data[dgl.NID],
                ),
            )
    for ntype in bg.dsttypes:
        for key in g.nodes[ntype].data:
            assert F.array_equal(
                bg.dstnodes[ntype].data[key],
                F.gather_row(
                    g.nodes[ntype].data[key],
                    bg.dstnodes[ntype].data[dgl.NID],
                ),
            )
    for etype in bg.canonical_etypes:
        for key in g.edges[etype].data:
            assert F.array_equal(
                bg.edges[etype].data[key],
                F.gather_row(
                    g.edges[etype].data[key], bg.edges[etype].data[dgl.EID]
                ),
            )