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):
      generator = RelationalFullBatchNodeGenerator(G, sparse=sparse)
      n_nodes = len(G.nodes())
  
      gen = generator.flow(node_ids, node_targets)
      if sparse:
          [X, tind, *As], y = gen[0]
          As_indices = As[: self.num_relationships]
          As_values = As[self.num_relationships :]
  
          As_sparse = [
              sps.coo_matrix(
                  (A_val[0], (A_ind[0, :, 0], A_ind[0, :, 1])),
                  shape=(n_nodes, n_nodes),
              )
              for A_ind, A_val in zip(As_indices, As_values)
          ]
          As_dense = [A.toarray() for A in As_sparse]
  
      else:
          [X, tind, *As], y = gen[0]
          As_dense = As
  
      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)
  
      return As_dense, tind, y
  
imports: from stellargraph.core.graph import *
  from stellargraph.mapper.full_batch_generators import RelationalFullBatchNodeGenerator
  import networkx
  import numpy
  import pytest
  import pandas
  import scipy.sparse
  from ..test_utils.graphs import relational_create_graph_features, example_hin_1
label_desc: Use image node_id 3 for calling the Test_RelationalFullBatchNodeGenerator obj's underlying member method code with example usage: obj.generator_flow(G, node_ids, node_targets, sparse) and returns: As_dense,  tind,  y