def should_save(self, mime_type):
    '\n        Returns True if ``mime_type`` is approved by this policy.\n\n        If rules are valid, this method always returns True or False.\n\n        :param str mime_type:\n        :rtype: bool\n        '
    should_save = False
    for (pattern, match, save) in self._rules:
        if (pattern is None):
            should_save = save
            break
        mimecheck = (pattern.search(mime_type) is not None)
        if (match == 'DOES_NOT_MATCH'):
            mimecheck = (not mimecheck)
        if mimecheck:
            should_save = save
            break
    return should_save
Returns True if ``mime_type`` is approved by this policy.

If rules are valid, this method always returns True or False.

:param str mime_type:
:rtype: bool
def should_save(self, mime_type):
    '\n        Returns True if ``mime_type`` is approved by this policy.\n\n        If rules are valid, this method always returns True or False.\n\n        :param str mime_type:\n        :rtype: bool\n        '
    should_save = False
    for (pattern, match, save) in self._rules:
        if (pattern is None):
            should_save = save
            break
        mimecheck = (pattern.search(mime_type) is not None)
        if (match == 'DOES_NOT_MATCH'):
            mimecheck = (not mimecheck)
        if mimecheck:
            should_save = save
            break
    return should_save