<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scalar_reshape(a, newshape, order='C'):
 """ Reshape, but also return scalars or empty lists. Identical to `numpy.reshape` except in the case where `newshape` is the empty tuple, in which case we return a scalar instead of a 0-dimensional array. Examples -------- True 3.14 array([ 2.71]) [] """

    if newshape == ():
        return np.asscalar(a)

    if newshape == (0,):
        return []

    return np.reshape(a, newshape, order)