<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_credentials(self, username, password):
 """ Set a new username and password. :param str username: New username. :param str password: New password. """

        if username is not None:
            self._username = username

        if password is not None:
            self._password = password