def METHOD_NAME(status):
    """ Check the status of a mkl functions and raise a python exeption if
    there is an error.
    """
    if status:
        lib.DftiErrorMessage.restype = ctypes.c_char_p
        msg = lib.DftiErrorMessage(status)
        raise RuntimeError(msg)