def convert_data(data):
    """Preprocess data by reshaping

    :param data: original data
    :type data: dict
    :return: processed data
    :rtype: dict
    """
    x_train = data['x_train']
    y_train = data['y_train']
    x_test = data['x_test']
    y_test = data['y_test']

    n_features = x_train.shape[-1]

    x_train = x_train.reshape(-1, 1, n_features)
    y_train = y_train.reshape(-1, 1, n_features)
    x_test = x_test.reshape(-1, 1, n_features)
    y_test = y_test.reshape(-1, 1, n_features)

    return {
        'x_train': x_train,
        'x_test': x_test,
        'y_train': y_train,
        'y_test': y_test,
    }