code: def get_spec(x):
      if isinstance(x, tf.SparseTensor) or sp.issparse(x):
          return tf.SparseTensorSpec
      else:
          return tf.TensorSpec
  
file_path: spektral/spektral/data/utils.py
imports: import numpy
  import tensorflow
  from scipy import sparse
  from spektral.utils import pad_jagged_array
  from spektral.utils.sparse import sp_matrix_to_sp_tensor
label_desc: Use image node_id 6 for calling a global function with example usage: get_spec(x) and returns: tf, tf