<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def thing2place(self, name):
 """Unset a Thing's location, and thus turn it into a Place."""

        self.engine._set_thing_loc(
            self.name, name, None
        )
        if (self.name, name) in self.engine._node_objs:
            thing = self.engine._node_objs[self.name, name]
            place = Place(self, name)
            for port in thing.portals():
                port.origin = place
            for port in thing.preportals():
                port.destination = place
            self.engine._node_objs[self.name, name] = place