    def set_deterministic(self, deterministic=True):
        """Context manager for changing the determinism of the policy.
        Args:
            set_deterministic (`bool`): Value to set the self._is_deterministic
                to during the context. The value will be reset back to the
                previous value when the context exits.
        """
        was_deterministic = self._deterministic
        self._deterministic = deterministic
        yield
        self._deterministic = was_deterministic
Context manager for changing the determinism of the policy.
Args:
set_deterministic (`bool`): Value to set the self._is_deterministic
to during the context. The value will be reset back to the
previous value when the context exits.
softlearning/policies/base_policy.py