human
Complete the below
def catch_ioerror(meth):

    ''''Function to decorate methods in order to catch IOError exceptions.'
    '''
assistant
#Here is the Python code you requested.
    @wraps(meth)
    def wrapper(self, *args, **kwargs):
        try:
            return meth(self, *args, **kwargs)
        except IOError as (errno, strerror):
            if (errno == ENOSPC):
                msg = 'No    space    left    on    device'
                raise ScanMustStopByKnownReasonExc(msg)
    return wrapper