code: def get_last_metrics(self):
          
          read_up_to = self._logged_metrics.qsize()
          messages = []
          for i in range(read_up_to):
              try:
                  messages.append(self._logged_metrics.get_nowait())
              except Empty:
                  pass
          return messages
docs: Read all measurement events since last call of the method.
  
          :return List[ScalarMetricLogEntry]