<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_current_context(self, name):
 """Set the current context in kubeconfig."""

        if self.context_exists(name):
            self.data['current-context'] = name
        else:
            raise KubeConfError("Context does not exist.")