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

def deregister_entity_from_group(self, entity, group):
        '''
        Removes entity from group
        '''
        if entity in self._entities:
            if entity in self._groups[group]:
                self._groups[group].remove(entity)
        else:
            raise UnmanagedEntityError(entity)