def step_per_sec(self, average_episodes):
        """
        Speedometer, step per second

        Args:
            average_episodes: average over the past N episodes
        """
        assert average_episodes > 0
        return (sum(self.episode_steps[-average_episodes:])
                / (sum(self.episode_durations[-average_episodes:]) + 1e-7))

        Speedometer, step per second

        Args:
            average_episodes: average over the past N episodes
        
surreal/env/monitor.py