def _prepare_reward_function(self):
        """ Prepares a list of reward functions, whcih will be called to compute the total reward.
            Looks for self._reward_<REWARD_NAME>, where <REWARD_NAME> are names of all non zero reward scales in the cfg.
        """
        # reward containers
        reward_container_name = self.cfg.rewards.reward_container_name
        from forward_locomotion.go1_gym.rewards.original_reward import OriginalReward
        from forward_locomotion.go1_gym.rewards.eureka_reward import EurekaReward
        if reward_container_name == "OriginalReward":
            self.reward_container = OriginalReward(self)
        elif reward_container_name == "EurekaReward":
            self.reward_container = EurekaReward(self)
        else:
            raise NameError(f"Unknown reward container: {reward_container_name}")

        if reward_container_name == "OriginalReward":
            # remove zero scales + multiply non-zero ones by dt
            for key in list(self.reward_scales.keys()):
                scale = self.reward_scales[key]
                if scale == 0:
                    self.reward_scales.pop(key)
                else:
                    self.reward_scales[key] *= self.dt
            # prepare list of functions
            self.reward_functions = []
            self.reward_names = []
            for name, scale in self.reward_scales.items():
                if name == "termination":
                    continue
                if not hasattr(self.reward_container, '_reward_' + name):
                    print(f"Warning: reward {'_reward_' + name} has nonzero coefficient but was not found!")
                else:
                    self.reward_names.append(name)
                    self.reward_functions.append(getattr(self.reward_container, '_reward_' + name))
        else:
            _, reward_components = self.reward_container.compute_reward()
            self.reward_names = list(reward_components.keys())

        # reward episode sums
        self.episode_sums = {
            name: torch.zeros(self.num_envs, dtype=torch.float, device=self.device, requires_grad=False)
            for name in self.reward_names}
        self.episode_sums["total"] = torch.zeros(self.num_envs, dtype=torch.float, device=self.device,
                                                 requires_grad=False)
        self.episode_sums["success"] = torch.zeros(self.num_envs, dtype=torch.float, device=self.device,
                                                    requires_grad=False)
        self.episode_sums_eval = {
            name: -1 * torch.ones(self.num_envs, dtype=torch.float, device=self.device, requires_grad=False)
            for name in self.reward_names}
        self.episode_sums_eval["total"] = torch.zeros(self.num_envs, dtype=torch.float, device=self.device,
                                                      requires_grad=False)
        self.episode_sums_eval["success"] = torch.zeros(self.num_envs, dtype=torch.float, device=self.device,
                                                            requires_grad=False)
        self.command_sums = {
            name: torch.zeros(self.num_envs, dtype=torch.float, device=self.device, requires_grad=False)
            for name in
            list(self.reward_names) + ["lin_vel_raw", "ang_vel_raw", "lin_vel_residual", "ang_vel_residual",
                                               "ep_timesteps"]}
 Prepares a list of reward functions, whcih will be called to compute the total reward.
            Looks for self._reward_<REWARD_NAME>, where <REWARD_NAME> are names of all non zero reward scales in the cfg.
        
forward_locomotion/go1_gym/envs/base/legged_robot.py