code: def test_generator_flow_shuffle():
      generator = PaddedGraphGenerator(graphs=graphs)
      num_epochs_to_check = 5
  
      def get_batches(seq):
          return [seq[i][0] for i in range(len(seq))]
  
      def batches_all_equal(batches, other_batches):
          checks = [
              inp.shape == other_inp.shape
              and np.allclose(inp, other_inp)
              for batch, other_batch in zip(batches, other_batches)
              for inp, other_inp in zip(batch, other_batch)
          ]
          return all(checks)
  
      def get_next_epoch_batches(seq):
          seq.on_epoch_end()
          return get_batches(seq)
  
      # shuffle = False
      seq = generator.flow(
          graphs=[0, 1, 2], batch_size=2, shuffle=False
      )
      batches = get_batches(seq)
      for _ in range(num_epochs_to_check):
          assert batches_all_equal(batches, get_next_epoch_batches(seq))
  
      # shuffle = True, fixed seed
      seq = generator.flow(
          graphs=[0, 1, 2], batch_size=2, shuffle=True, seed=0
      )
      batches = get_batches(seq)
      at_least_one_different = False
      for _ in range(num_epochs_to_check):
          if not batches_all_equal(
              batches, get_next_epoch_batches(seq)
          ):
              at_least_one_different = True
      assert at_least_one_different
  
imports: from stellargraph.core.graph import *
  from stellargraph.mapper.padded_graph_generator import PaddedGraphGenerator, PaddedGraphSequence
  import numpy
  import pytest
  from ..test_utils.graphs import example_graph_random, example_graph, example_hin_1
label_desc: Use image node_id 14 for calling a global function with example usage: test_generator_flow_shuffle() and returns: unknown, all, get_batches