def METHOD_NAME(image, monitor_key):
    """Return the monitor value from an image using an header key.
    :param fabio.fabioimage.FabioImage image: Image containing the header
    :param str monitor_key: Key containing the monitor
    :return: returns the monitor else raise an exception
    :rtype: float
    :raise MonitorNotFound: when the expected monitor is not found on the
        header
    """
    if monitor_key is None:
        return Exception("No monitor defined")
    if fabio.version_info[0:2] < (0, 9):
        # FIXME: Remove this dead code by upgrading the dependancy to fabio>=0.9
        if isinstance(image, fabio.edfimage.EdfImage):
            return _get_monitor_value_from_edf(image, monitor_key)
        elif isinstance(image, fabio.numpyimage.NumpyImage):
            return _get_monitor_value_from_edf(image, monitor_key)
        elif isinstance(image, fabio.hdf5image.Hdf5Image):
            return _get_monitor_value_from_hdf5(image, monitor_key)
    else:
        if isinstance(image, (fabio.edfimage.EdfImage, fabio.edfimage.EdfFrame)):
            return _get_monitor_value_from_edf(image, monitor_key)
        elif isinstance(image, fabio.numpyimage.NumpyImage):
            return _get_monitor_value_from_edf(image, monitor_key)
        elif isinstance(image, (fabio.hdf5image.Hdf5Image, fabio.hdf5image.Hdf5Frame)):
            return _get_monitor_value_from_hdf5(image, monitor_key)
    raise Exception("File format '%s' unsupported" % type(image))