class_docstr: Tests of Attri2VecLinkGenerator class
code: def test_edge_consistency(self):
      G = example_graph(feature_size=1)
      edges = list(G.edges())
      edge_labels = list(range(len(edges)))
  
      mapper = Attri2VecLinkGenerator(G, batch_size=2).flow(
          edges, edge_labels
      )
  
      assert len(mapper) == 2
  
      for batch in range(len(mapper)):
          nf, nl = mapper[batch]
          e1 = edges[nl[0]]
          e2 = edges[nl[1]]
          assert nf[0][0, 0] == e1[0]
          assert nf[1][0] == G.node_ids_to_ilocs([e1[1]])[0]
          assert nf[0][1, 0] == e2[0]
          assert nf[1][1] == G.node_ids_to_ilocs([e2[1]])[0]
  
imports: import numpy
  import networkx
  import pytest
  import random
  from stellargraph.mapper import *
  from stellargraph.core.graph import *
  from stellargraph.data.unsupervised_sampler import *
  from ..test_utils.graphs import example_graph, example_graph_random, example_hin_1, repeated_features, weighted_tree
  from ..None import test_utils
label_desc: Use image node_id 3 for calling the Test_Attri2VecLinkGenerator obj's underlying member method code with example usage: obj.test_edge_consistency() without return types