code: def test_incidence_matrix(edges, expected_t):
      """
      Tests that `incidence_matrix` produces correct results.
      :param edges: The graph to use for testing, as a list of edges.
      :param expected_t: The expected transformation matrix.
      """
      # Arrange.
      # Create the adjacency matrix.
      graph = nx.Graph(edges)
      adjacency = nx.to_numpy_array(graph)
  
      # Act.
      got_t = convolution.incidence_matrix(adjacency)
  
      # Assert.
      got_t = got_t.numpy()
      expected_t = np.array(expected_t)
      np.testing.assert_array_equal(expected_t, got_t)
  
imports: import networkx
  import numpy
  import pytest
  import scipy.sparse
  from spektral.utils import convolution
label_desc: Use image node_id 12 for calling a global function with example usage: test_incidence_matrix(edges, expected_t) without return types