class_docstr: Tests of FullBatchNodeGenerator class
class_docstr_tok: ["Tests","of","FullBatchNodeGenerator","class"]
code: def generator_flow(
      self,
      G,
      node_ids,
      node_targets,
      sparse=False,
      method="none",
      k=1,
      teleport_probability=0.1,
  ):
      generator = FullBatchNodeGenerator(
          G,
          sparse=sparse,
          method=method,
          k=k,
          teleport_probability=teleport_probability,
      )
      n_nodes = G.number_of_nodes()
  
      gen = generator.flow(node_ids, node_targets)
      if sparse:
          [X, tind, A_ind, A_val], y = gen[0]
          A_sparse = sps.coo_matrix(
              (A_val[0], (A_ind[0, :, 0], A_ind[0, :, 1])),
              shape=(n_nodes, n_nodes),
          )
          A_dense = A_sparse.toarray()
  
      else:
          [X, tind, A], y = gen[0]
          A_dense = A[0]
  
      np.testing.assert_allclose(
          X, gen.features
      )  # X should be equal to gen.features
      assert tind.shape[1] == len(node_ids)
  
      if node_targets is not None:
          np.testing.assert_allclose(y.squeeze(), node_targets)
  
      # Check that the diagonals are one
      if method == "self_loops":
          np.testing.assert_allclose(A_dense.diagonal(), 1)
  
      return A_dense, tind, y
  
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 4 for calling the Test_FullBatchNodeGenerator obj's underlying member method code with example usage: obj.generator_flow(G, node_ids, node_targets, sparse, method, k, teleport_probability) and returns: A_dense,  tind,  y