class_docstr: A Keras-compatible data generator for node inference using ClusterGCN model.
  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 :meth:`flow` method of
  :class:`.ClusterNodeGenerator`.
  
  Args:
      graph (StellarGraph): The graph
      clusters (list): A list of lists such that each sub-list indicates the nodes in a cluster.
          The length of this list, len(clusters) indicates the number of batches in one epoch.
      targets (np.ndarray, optional): An optional array of node targets of size (N x C),
          where C is the target size (e.g., number of classes for one-hot class targets)
      node_ids (iterable, optional): The node IDs for the target nodes. Required if targets is not None.
      normalize_adj (bool, optional): Specifies whether the adjacency matrix for each mini-batch should
          be normalized or not. The default is True.
      q (int, optional): The number of subgraphs to combine for each batch. The default value is
          1 such that the generator treats each subgraph as a batch.
      lam (float, optional): The mixture coefficient for adjacency matrix normalisation (the
          'diagonal enhancement' method). Valid values are in the interval [0, 1] and the default value is 0.1.
      name (str, optional): An optional name for this generator object.
class_docstr_tok: ["A","Keras-compatible","data","generator","for","node","inference","using","ClusterGCN","model",".","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",":","meth",":","`","flow","`","method","of",":","class",":","`",".ClusterNodeGenerator","`",".","Args",":","graph","(","StellarGraph",")",":","The","graph","clusters","(","list",")",":","A","list","of","lists","such","that","each","sub-list","indicates","the","nodes","in","a","cluster",".","The","length","of","this","list",",","len","(","clusters",")","indicates","the","number","of","batches","in","one","epoch",".","targets","(","np.ndarray",",","optional",")",":","An","optional","array","of","node","targets","of","size","(","N","x","C",")",",","where","C","is","the","target","size","(","e.g.",",","number","of","classes","for","one-hot","class","targets",")","node_ids","(","iterable",",","optional",")",":","The","node","IDs","for","the","target","nodes",".","Required","if","targets","is","not","None",".","normalize_adj","(","bool",",","optional",")",":","Specifies","whether","the","adjacency","matrix","for","each","mini-batch","should","be","normalized","or","not",".","The","default","is","True",".","q","(","int",",","optional",")",":","The","number","of","subgraphs","to","combine","for","each","batch",".","The","default","value","is","1","such","that","the","generator","treats","each","subgraph","as","a","batch",".","lam","(","float",",","optional",")",":","The","mixture","coefficient","for","adjacency","matrix","normalisation","(","the","'diagonal","enhancement","'","method",")",".","Valid","values","are","in","the","interval","[","0",",","1","]","and","the","default","value","is","0.1.","name","(","str",",","optional",")",":","An","optional","name","for","this","generator","object","."]
docstr: Shuffle all nodes at the end of each epoch
docstr_tok: ["Shuffle","all","nodes","at","the","end","of","each","epoch"]
code: def on_epoch_end(self):
      """
      Shuffle all nodes at the end of each epoch
      """
      if self.q > 1:
          # combine clusters
          cluster_indices = list(range(len(self.clusters_original)))
          random.shuffle(cluster_indices)
          self.clusters = []
  
          for i in range(0, len(cluster_indices) - 1, self.q):
              cc = cluster_indices[i : i + self.q]
              tmp = []
              for l in cc:
                  tmp.extend(list(self.clusters_original[l]))
              self.clusters.append(tmp)
      else:
          self.clusters = copy.deepcopy(self.clusters_original)
  
      self.__node_buffer = dict()
  
      random.shuffle(self.clusters)
  
imports: import random
  import copy
  import numpy
  import networkx
  from tensorflow.keras.utils import Sequence
  from scipy import sparse
  from ..core.graph import StellarGraph
  from ..core.utils import is_real_iterable, normalize_adj
  from ..connector.neo4j.graph import Neo4jStellarGraph
  from .base import Generator
label_desc: Use image node_id 6 for calling the ClusterNodeSequence obj's underlying member method code with example usage: obj.on_epoch_end() without return types