code: def reshape(a, shape=None, name=None):
      """
      Reshapes a according to shape, dealing automatically with sparsity.
      :param a: Tensor or SparseTensor.
      :param shape: new shape.
      :param name: name for the operation.
      :return: Tensor or SparseTensor.
      """
      if K.is_sparse(a):
          reshape_op = tf.sparse.reshape
      else:
          reshape_op = tf.reshape
  
      return reshape_op(a, shape=shape, name=name)
  
imports: import numpy
  import tensorflow
  from tensorflow.keras import backend
label_desc: Use image node_id 2 for calling a global function with example usage: reshape(a, shape, name) and returns: reshape_op