def METHOD_NAME(self, filename, code):
    if self.deductions[filename]["total"] > self.config.get("maximum deductions per file"):
        return True
    if self.deductions[filename][code] > self.lookup(code).get("maximumDeductions"):
        return True
    return False