code: def test_generator_flow_invalid_shape():
      generator = PaddedGraphGenerator(graphs=graphs)
  
      with pytest.raises(
          ValueError,
          match=r"graphs: expected a shape .* found shape \(\)",
      ):
          generator.flow(0)
  
      with pytest.raises(
          ValueError,
          match=r"graphs: expected a shape .* found shape \(2, 3, 4\)",
      ):
          generator.flow(np.ones((2, 3, 4)))
  
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 9 for calling a global function with example usage: test_generator_flow_invalid_shape() without return types