class_docstr: A Keras-compatible data generator for training and evaluating graph classification models.
  Use this class with the Keras methods :meth:`keras.Model.fit`,
      :meth:`keras.Model.evaluate`, and
      :meth:`keras.Model.predict`,
  
  This class should be created using the `.flow(...)` method of
  :class:`.PaddedGraphGenerator`.
  
  Args:
      graphs (list)): The graphs as StellarGraph objects.
      selected_ilocs (array): an array of indices into ``graphs``, of shape N × K for some N and K.
      targets (np.ndarray, optional): An optional array of graph targets of size (N x C),
          where N is the number of selected graph ilocs and C is the target size (e.g., number of classes.)
      normalize (bool, optional): Specifies whether the adjacency matrix for each graph should
          be normalized or not. The default is True.
      symmetric_normalization (bool, optional): Use symmetric normalization if True, that is left and right multiply
          the adjacency matrix by the inverse square root of the degree matrix; otherwise left multiply the adjacency
          matrix by the inverse of the degree matrix. This parameter is ignored if normalize=False.
      batch_size (int, optional): The batch size. It defaults to 1.
      name (str, optional): An optional name for this generator object.
      shuffle (bool, optional): If True the node IDs will be shuffled at the end of each epoch.
      seed (int, optional): Random seed.
class_docstr_tok: ["A","Keras-compatible","data","generator","for","training","and","evaluating","graph","classification","models",".","Use","this","class","with","the","Keras","methods",":","meth",":","`","keras.Model.fit","`",",",":","meth",":","`","keras.Model.evaluate","`",",","and",":","meth",":","`","keras.Model.predict","`",",","This","class","should","be","created","using","the","`",".flow","(","...",")","`","method","of",":","class",":","`",".PaddedGraphGenerator","`",".","Args",":","graphs","(","list",")",")",":","The","graphs","as","StellarGraph","objects",".","selected_ilocs","(","array",")",":","an","array","of","indices","into","``","graphs","``",",","of","shape","N","\u00d7","K","for","some","N","and","K.","targets","(","np.ndarray",",","optional",")",":","An","optional","array","of","graph","targets","of","size","(","N","x","C",")",",","where","N","is","the","number","of","selected","graph","ilocs","and","C","is","the","target","size","(","e.g.",",","number","of","classes",".",")","normalize","(","bool",",","optional",")",":","Specifies","whether","the","adjacency","matrix","for","each","graph","should","be","normalized","or","not",".","The","default","is","True",".","symmetric_normalization","(","bool",",","optional",")",":","Use","symmetric","normalization","if","True",",","that","is","left","and","right","multiply","the","adjacency","matrix","by","the","inverse","square","root","of","the","degree","matrix",";","otherwise","left","multiply","the","adjacency","matrix","by","the","inverse","of","the","degree","matrix",".","This","parameter","is","ignored","if","normalize=False",".","batch_size","(","int",",","optional",")",":","The","batch","size",".","It","defaults","to","1.","name","(","str",",","optional",")",":","An","optional","name","for","this","generator","object",".","shuffle","(","bool",",","optional",")",":","If","True","the","node","IDs","will","be","shuffled","at","the","end","of","each","epoch",".","seed","(","int",",","optional",")",":","Random","seed","."]
code: def _pad_graphs(self, graphs, adj_graphs, max_nodes):
      # pad adjacency and feature matrices to equal the size of those from the largest graph
      features = [
          np.pad(
              graph.node_features(),
              pad_width=(
                  (0, max_nodes - graph.number_of_nodes()),
                  (0, 0),
              ),
          )
          for graph in graphs
      ]
      features = np.stack(features)
  
      for adj in adj_graphs:
          adj.resize((max_nodes, max_nodes))
      adj_graphs = np.stack([adj.toarray() for adj in adj_graphs])
  
      masks = np.full(
          (len(graphs), max_nodes), fill_value=False, dtype=np.bool
      )
      for index, graph in enumerate(graphs):
          masks[index, : graph.number_of_nodes()] = True
  
      # features is array of dimensionality
      #      batch size x N x F
      # masks is array of dimensionality
      #      batch size x N
      # adj_graphs is array of dimensionality
      #      batch size x N x N
      # graph_targets is array of dimensionality
      #      batch size x C
      # where N is the maximum number of nodes for largest graph in the batch, F is
      # the node feature dimensionality, and C is the number of target classes
      return [features, masks, adj_graphs]
  
imports: from ..core.graph import StellarGraph
  from ..core.utils import is_real_iterable, normalize_adj
  from ..random import random_state
  import numpy
  from tensorflow.keras.utils import Sequence
  from .base import Generator
label_desc: Use image node_id 4 for calling the PaddedGraphSequence obj's underlying member method code with example usage: obj._pad_graphs(graphs, adj_graphs, max_nodes) and returns: list