<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def unregister(self, entity_class, entity):
 """ Unregisters the given entity for the given class and discards its state information. """

        EntityState.release(entity, self)
        self.__entity_set_map[entity_class].remove(entity)