code: def test_generator_flow_with_targets():
      generator = PaddedGraphGenerator(graphs=graphs)
  
      seq = generator.flow(
          graphs=[1, 2], targets=np.array([0, 1]), batch_size=1
      )
      assert isinstance(seq, PaddedGraphSequence)
  
      for batch in seq:
          assert batch[0][0].shape[0] == 1
          assert batch[0][1].shape[0] == 1
          assert batch[0][2].shape[0] == 1
          assert batch[1].shape[0] == 1
  
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 12 for calling a global function with example usage: test_generator_flow_with_targets() without return types