docstr: Creates a generator/sequence object for training or evaluation
  with the supplied node ids and numeric targets.
  
  Args:
      node_ids: an iterable of node ids for the nodes of interest
          (e.g., training, validation, or test set nodes)
      targets: a 1D or 2D array of numeric node targets with shape ``(len(node_ids),)``
          or ``(len(node_ids), target_size)``
      use_ilocs (bool): if True, node_ids are represented by ilocs,
          otherwise node_ids need to be transformed into ilocs
  
  Returns:
      A NodeSequence object to use with GCN or GAT models
      in Keras methods :meth:`fit`, :meth:`evaluate`,
      and :meth:`predict`
docstr_tok: ["Creates","a","generator\/sequence","object","for","training","or","evaluation","with","the","supplied","node","ids","and","numeric","targets",".","Args",":","node_ids",":","an","iterable","of","node","ids","for","the","nodes","of","interest","(","e.g.",",","training",",","validation",",","or","test","set","nodes",")","targets",":","a","1D","or","2D","array","of","numeric","node","targets","with","shape","``","(","len","(","node_ids",")",",",")","``","or","``","(","len","(","node_ids",")",",","target_size",")","``","use_ilocs","(","bool",")",":","if","True",",","node_ids","are","represented","by","ilocs",",","otherwise","node_ids","need","to","be","transformed","into","ilocs","Returns",":","A","NodeSequence","object","to","use","with","GCN","or","GAT","models","in","Keras","methods",":","meth",":","`","fit","`",",",":","meth",":","`","evaluate","`",",","and",":","meth",":","`","predict","`"]
code: def flow(self, node_ids, targets=None, use_ilocs=False):
      """
      Creates a generator/sequence object for training or evaluation
      with the supplied node ids and numeric targets.
  
      Args:
          node_ids: an iterable of node ids for the nodes of interest
              (e.g., training, validation, or test set nodes)
          targets: a 1D or 2D array of numeric node targets with shape ``(len(node_ids),)``
              or ``(len(node_ids), target_size)``
          use_ilocs (bool): if True, node_ids are represented by ilocs,
              otherwise node_ids need to be transformed into ilocs
  
      Returns:
          A NodeSequence object to use with GCN or GAT models
          in Keras methods :meth:`fit`, :meth:`evaluate`,
          and :meth:`predict`
  
      """
      if targets is not None:
          # Check targets is an iterable
          if not is_real_iterable(targets):
              raise TypeError("Targets must be an iterable or None")
  
          # Check targets correct shape
          if len(targets) != len(node_ids):
              raise TypeError(
                  "Targets must be the same length as node_ids"
              )
  
      # find the indices of the nodes, handling both multiplicity 1 [node, node, ...] and 2
      # [(source, target), ...]
      node_ids = np.asarray(node_ids)
      if use_ilocs:
          node_indices = node_ids
      else:
          flat_node_ids = node_ids.reshape(-1)
          flat_node_indices = self.graph.node_ids_to_ilocs(
              flat_node_ids
          )
          # back to the original shape
          node_indices = flat_node_indices.reshape(node_ids.shape)
      if self.use_sparse:
          return SparseFullBatchSequence(
              self.features, self.Aadj, targets, node_indices
          )
      else:
          return FullBatchSequence(
              self.features, self.Aadj, targets, node_indices
          )
  
imports: import warnings
  import operator
  import random
  import numpy
  import itertools
  import networkx
  import scipy.sparse
  from tensorflow.keras import backend
  from functools import reduce
  from tensorflow.keras.utils import Sequence
  from .None import Generator, FullBatchSequence, SparseFullBatchSequence, RelationalFullBatchNodeSequence, GraphSAGENodeGenerator, DirectedGraphSAGENodeGenerator
  from ..core.graph import StellarGraph
  from ..core.utils import is_real_iterable
  from ..core.utils import GCN_Aadj_feats_op, PPNP_Aadj_feats_op
  from ..core.validation import comma_sep
label_desc: Use image node_id 3 for calling the FullBatchGenerator obj's underlying member method code with example usage: obj.flow(node_ids, targets, use_ilocs) and returns: SparseFullBatchSequence, FullBatchSequence