Answer:
This function is a method of a class object that checks a message path and register or update the previous messages list with only new messages.
Step-by-step explanation:
def message_check(self ) :
If message.pathThrough == True and \ message.origin not in self.activeLinks:
Self.activeLinks.append( message.origin )
Elif message.pathThrouh == False and \ message.origin in self.activeLinks:
Self.activeLinks.remove( message.origin )