code: def test_line_graph_batch():
      """
      Tests that `line_graph` works with multiple graphs in a batch.
      """
      # Arrange.
      # Create test graphs.
      graph1 = nx.house_graph()
      incidence1 = nx.incidence_matrix(graph1).toarray()
      # We will have to pad the first incidence matrix with two columns,
      # because the second graph has two extra edges.
      incidence1 = np.pad(incidence1, ((0, 0), (0, 2)))
      graph2 = nx.house_x_graph()
      incidence2 = nx.incidence_matrix(graph2).toarray()
  
      # Act.
      # Get the line graph for both graphs individually, and both together
      # as a batch.
      graph1_line = convolution.line_graph(incidence1)
      graph2_line = convolution.line_graph(incidence2)
  
      batch = np.stack([incidence1, incidence2], axis=0)
      line_graph_batch = convolution.line_graph(batch)
  
      # Assert.
      # Both ways of doing it should produce the same results.
      np.testing.assert_array_equal(graph1_line, line_graph_batch[0])
      np.testing.assert_array_equal(graph2_line, line_graph_batch[1])
  
imports: import networkx
  import numpy
  import pytest
  import scipy.sparse
  from spektral.utils import convolution
label_desc: Use image node_id 15 for calling a global function with example usage: test_line_graph_batch() without return types