class_docstr: Tensorflow backend datasets. 
class_docstr_tok: ["Tensorflow","backend","datasets","."]
docstr: This method is called every epoch and performs dataset shuffling. 
docstr_tok: ["This","method","is","called","every","epoch","and","performs","dataset","shuffling","."]
code: def on_epoch_end(self) -> None:
      """This method is called every epoch and performs dataset shuffling."""
      self.indexes = np.arange(self.X.shape[0])
  
      if self.shuffle:
          np.random.shuffle(self.indexes)
  
imports: import os
  import random
  from typing import Any, List, Dict, Callable, Union, Optional, TYPE_CHECKING
  import numpy
  import tensorflow
  import tensorflow.keras
  from alibi.explainers.backends.cfrl_base import CounterfactualRLDataset
  from alibi.models.tensorflow.actor_critic import Actor, Critic
label_desc: Use image node_id 2 for calling the TfCounterfactualRLDataset obj's underlying member method code with example usage: obj.on_epoch_end() without return types