class_docstr: Tests of FullBatchNodeGenerator class
class_docstr_tok: ["Tests","of","FullBatchNodeGenerator","class"]
code: def test_generator_flow_withtargets(self):
      node_ids = list(self.G.nodes())[:3]
      node_targets = (
          np.ones((len(node_ids), self.target_dim))
          * np.arange(3)[:, None]
      )
      _, tind, y = self.generator_flow(
          self.G, node_ids, node_targets, sparse=True
      )
      np.testing.assert_allclose(tind.squeeze(), range(3))
      np.testing.assert_allclose(y.squeeze(), node_targets[:3])
      _, tind, y = self.generator_flow(
          self.G, node_ids, node_targets, sparse=False
      )
      np.testing.assert_allclose(tind.squeeze(), range(3))
      np.testing.assert_allclose(y.squeeze(), node_targets[:3])
  
      node_ids = list(self.G.nodes())[::-1]
      node_targets = (
          np.ones((len(node_ids), self.target_dim))
          * np.arange(len(node_ids))[:, None]
      )
      _, tind, y = self.generator_flow(self.G, node_ids, node_targets)
      np.testing.assert_allclose(
          tind.squeeze(), range(len(node_ids))[::-1]
      )
      np.testing.assert_allclose(y.squeeze(), node_targets)
  
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 6 for calling the Test_FullBatchNodeGenerator obj's underlying member method code with example usage: obj.test_generator_flow_withtargets() without return types