code: def test_attri2vec_nodemapper_2():
      n_feat = 1
      n_batch = 2
  
      G = example_graph_2(feature_size=n_feat)
      nodes = list(G.nodes())
  
      # With no shuffle
      mapper = Attri2VecNodeGenerator(G, batch_size=n_batch).flow(nodes)
      expected_node_batches = [[1, 2], [3, 4], [5]]
      assert len(mapper) == 3
      for ii in range(len(mapper)):
          nf, nl = mapper[ii]
          assert all(np.ravel(nf) == expected_node_batches[ii])
  
imports: from stellargraph.core.graph import *
  from stellargraph.mapper import *
  import networkx
  import numpy
  import random
  import pytest
  import pandas
  import scipy.sparse
  from ..test_utils.graphs import example_graph, example_graph_random, example_hin_1, create_graph_features, repeated_features, weighted_tree
  from ..None import test_utils
label_desc: Use image node_id 31 for calling a global function with example usage: test_attri2vec_nodemapper_2() without return types