docs: def _convert_reward(self, reward):
      """Convert the reward to 32 bits.
  
      Args:
        reward: Numpy reward.
  
      Raises:
        ValueError: Rewards contain infinite values.
  
      Returns:
        Numpy reward with 32-bit data type.
      """
      if not np.isfinite(reward).all():
        raise ValueError('Infinite reward encountered.')
      return np.array(reward, dtype=np.float32)