<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_state(self, entity_id, new_state, **kwargs):
        "Updates or creates the current state of an entity."
        return remote.set_state(self.api, new_state, **kwargs)