class_docstr: Tests of FullBatchNodeGenerator class
class_docstr_tok: ["Tests","of","FullBatchNodeGenerator","class"]
code: def generator_flow(
      self,
      G,
      link_ids,
      link_targets,
      sparse=False,
      method="none",
      k=1,
      teleport_probability=0.1,
  ):
      generator = FullBatchLinkGenerator(
          G,
          sparse=sparse,
          method=method,
          k=k,
          teleport_probability=teleport_probability,
      )
      n_nodes = G.number_of_nodes()
  
      gen = generator.flow(link_ids, link_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 isinstance(tind, np.ndarray)
      assert tind.ndim == 3
      assert tind.shape[1] == len(link_ids)
      assert tind.shape[2] == 2
  
      if link_targets is not None:
          np.testing.assert_allclose(y.squeeze(), link_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 FullBatchGenerator, FullBatchLinkGenerator, FullBatchNodeGenerator
  import networkx
  import numpy
  import random
  import pytest
  import pandas
  import scipy.sparse
  from ..test_utils.graphs import create_graph_features, example_graph_random, example_hin_1, example_graph
label_desc: Use image node_id 4 for calling the Test_FullBatchLinkGenerator obj's underlying member method code with example usage: obj.generator_flow(G, link_ids, link_targets, sparse, method, k, teleport_probability) and returns: A_dense,  tind,  y