code: def test_squeezedsparseconversion_axis():
      N = 10
      A_indices, A_values, A = sparse_matrix_example(N)
      nnz = len(A_indices)
  
      A_ind = keras.Input(batch_shape=(nnz, 2), dtype="int64")
      A_val = keras.Input(batch_shape=(nnz, 1), dtype="float32")
  
      # Keras reshapes everything to have ndim at least 2, we need to flatten values
      A_val_1 = keras.layers.Lambda(lambda A: K.reshape(A, (-1,)))(
          A_val
      )
  
      A_mat = SqueezedSparseConversion(
          shape=(N, N), axis=None, dtype=A_val_1.dtype
      )([A_ind, A_val_1])
  
      ones = tf.ones((N, 1))
  
      x_out = keras.layers.Lambda(lambda xin: K.dot(xin, ones))(A_mat)
  
      model = keras.Model(inputs=[A_ind, A_val], outputs=x_out)
      z = model.predict([A_indices, A_values])
  
      np.testing.assert_allclose(z, A.sum(axis=1), atol=1e-7, rtol=1e-5)
  
file_path: stellargraph/tests/layer/test_misc.py
imports: import tensorflow
  from tensorflow import keras
  import numpy
  import scipy.sparse
  import pytest
  from stellargraph.layer.misc import *
  from ..test_utils.graphs import create_graph_features, example_graph
  from stellargraph.mapper import *
  from stellargraph.layer import *
label_desc: Use image node_id 4 for calling a global function with example usage: test_squeezedsparseconversion_axis() without return types