<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def state(self, state):
        '''Change the state of the client. This is one of the values
        defined in ClientStates.'''
        logger.debug('client changing to state=%s', ClientState.Names[state])
        self._state = state