@synchronized
    def get_topic_messages(self, topic_id):
        url = '/api/topics/{0}/messages.json'.format(topic_id)
        messages = self._connection.request('GET', url).get('messages', [])

        topic = self.get_topics().get(topic_id, {})
        unread = topic.get('unread', 0)
        group = self.get_groups().get(topic.get('group'), {})
        group['unread'] = max(group.get('unread', 0) - unread, 0)
        topic['unread'] = 0

        return messages
dataset/ETHPy150Open vlasovskikh/convoread/convoread/convore.py/Convore.get_topic_messages/original