def get_logs(): dp = DataParser(constants.log_file_path) mentions_by_ticker = dp.mentions_by_ticker() # summarize by user clustered_messages = dp.messages_by_user('JohnArtman', start_date=datetime(2018, 6, 1), end_date=datetime(2019, 1, 1)) summarized_messages = get_summary(clustered_messages, 5) print(summarized_messages)