<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _reshape_input_data(shape, desired_dim=3):
 """ Static function returns the column-wise shape for for an input shape. Input: shape: tuple Shape of an input array, so that it is always a column. desired_dim: int desired shape of output. For Y data it should be 3 (sample_no, dimension, ts_no). For X data - 2 (sample_no, 1) Output: new_shape: tuple New shape of the measurements array. Idea is that samples are along dimension 0, sample dimension - dimension 1, different time series - dimension 2. old_shape: tuple or None If the shape has been modified, return old shape, otherwise None. """


        if (len(shape) > 3):
            raise ValueError("""Input array is not supposed to be more
                                than 3 dimensional.""")

        if (len(shape) > desired_dim):
            raise ValueError("Input array shape is more than desired shape.")
        elif len(shape) == 1:
            if (desired_dim == 3):
                return ((shape[0], 1, 1), shape)  # last dimension is the
                # time serime_series_no
            elif (desired_dim == 2):
                return ((shape[0], 1), shape)

        elif len(shape) == 2:
            if (desired_dim == 3):
                return ((shape[1], 1, 1), shape) if (shape[0] == 1) else\
                    ((shape[0], shape[1], 1), shape)  # convert to column
                                                      # vector
            elif (desired_dim == 2):
                return ((shape[1], 1), shape) if (shape[0] == 1) else\
                    ((shape[0], shape[1]), None)  # convert to column vector

        else:  # len(shape) == 3
            return (shape, None)