<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setsudo(self, user=None):
 """ Set the subsequent API calls to the user provided :param user: User id or username to change to, None to return to the logged user :return: Nothing """

        if user is None:
            try:
                self.headers.pop('SUDO')
            except KeyError:
                pass
        else:
            self.headers['SUDO'] = user