code: def logs(self, prefix='worker'):
          
          logs = []
          logs += [('success_rate', np.mean(self.success_history))]
          if self.compute_Q:
              logs += [('mean_Q', np.mean(self.Q_history))]
          logs += [('episode', self.n_episodes)]
  
          if prefix != '' and not prefix.endswith('/'):
              return [(prefix + '/' + key, val) for key, val in logs]
          else:
              return logs
docs: Generates a dictionary that contains all collected statistics.