'Returns true if the message should be printed in the given timestamp, otherwise returns false. The timestamp is in seconds granularity.
:type timestamp: int
:type message: str
:rtype: bool'

def shouldPrintMessage(self, timestamp, message):

    while (self.__dq and (self.__dq[0][0] <= (timestamp - 10))):
        self.__printed.remove(self.__dq.popleft()[1])
    if (message in self.__printed):
        return False
    self.__dq.append((timestamp, message))
    self.__printed.add(message)
    return True
