def log(self, slots=None, **key_vals):
        """
        Args:
            slots: ids for the array
            **key_vals:
        """
        if slots is None:
            slots = range(self.n)

        for k, v in key_vals.items():
            counts = self.cache[k + '@counts'][slots] + 1
            self.cache[k + '@counts'][slots] = counts
            self.cache[k][slots] = v + (counts - 1) * self.cache[k][slots]
            self.cache[k][slots] /= counts

        Args:
            slots: ids for the array
            **key_vals:
        
globe_walking/go1_gym_learn/ppo_cse_teacher_student/metrics_caches.py