code: def test_node2vec_nodemapper_2():
      n_batch = 2
  
      G = example_graph_2()
      nodes = list(G.nodes())
  
      # With no shuffle
      mapper = Node2VecNodeGenerator(G, batch_size=n_batch).flow(nodes)
      expected_node_batches = [
          G.node_ids_to_ilocs([1, 2]),
          G.node_ids_to_ilocs([3, 4]),
          G.node_ids_to_ilocs([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 35 for calling a global function with example usage: test_node2vec_nodemapper_2() without return types