<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def nonwhitelisted_allowed_principals(self, whitelist=None):
 """Find non whitelisted allowed principals."""


        if not whitelist:
            return []

        nonwhitelisted = []
        for statement in self.statements:
            if statement.non_whitelisted_principals(whitelist) and statement.effect == "Allow":
                nonwhitelisted.append(statement)

        return nonwhitelisted