'Check if the sender is in the allowed senders list.'

def sender_allowed(self, email_message):

    return (EmailContentSensor.get_msg_sender(email_message).upper() in (sender for sender in self._allowed_senders))
