code: def test_flatten_output():
      data = np.array(
          [[3, 1], [1, 2], [5, 0], [0, -4]], dtype=int
      ).reshape((2, 2, 2))
      mask = np.array([[True, True], [True, True]])
  
      data_sorted = np.array(
          [[1, 2, 3, 1], [5, 0, 0, -4]], dtype=int
      ).reshape((2, 4, 1))
  
      layer = SortPooling(k=2, flatten_output=True)
  
      data_out = layer(data, mask=mask)
  
      np.testing.assert_array_equal(data_out, data_sorted)
  
file_path: stellargraph/tests/layer/test_sort_pooling.py
imports: import pytest
  import numpy
  from stellargraph.layer.sort_pooling import SortPooling
label_desc: Use image node_id 5 for calling a global function with example usage: test_flatten_output() without return types