def METHOD_NAME(alert, text):
    note = Note(
        text=text,
        user=g.login,
        note_type=NoteType.alert,
        attributes=dict(
            resource=alert.resource,
            event=alert.event,
            environment=alert.environment,
            severity=alert.severity,
            status=alert.status
        ),
        alert=alert.id,
        customer=alert.customer
    )
    return note.create()