'Determine if there\'s an explicit rule for a particular extension.'

def _HasExplicitRuleForExtension(self, spec, extension):

    for rule in spec.get('rules', []):
        if (rule['extension'] == extension):
            return True
    return False
