<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_raster_y_inverted(layer):
 """Check if the raster is upside down, ie Y inverted. See issue : https://github.com/inasafe/inasafe/issues/4026 :param layer: The layer to test. :type layer: QgsRasterLayer :return: A boolean to know if the raster is correct or not. :rtype: bool """

    info = gdal.Info(layer.source(), format='json')
    y_maximum = info['cornerCoordinates']['upperRight'][1]
    y_minimum = info['cornerCoordinates']['lowerRight'][1]
    return y_maximum < y_minimum