def detach_from_world(self, physics_world: PhysicsWorld):
        """
        It is not fully remove, it will be left in memory. if this element is useless in the future, call Func destroy()
        Detach the object from the scene graph but store it in the memory
        Args:
            physics_world: PhysicsWorld, engine.physics_world

        Returns: None

        """
        if self.is_attached():
            self.origin.detachNode()
            self.dynamic_nodes.detach_from_physics_world(physics_world.dynamic_world)
            self.static_nodes.detach_from_physics_world(physics_world.static_world)
            logger.debug("{} is detached from the world.".format(self.class_name))
        else:
            logger.debug("Object {} is already detached from the world. Can not detach again".format(self.class_name))

        It is not fully remove, it will be left in memory. if this element is useless in the future, call Func destroy()
        Detach the object from the scene graph but store it in the memory
        Args:
            physics_world: PhysicsWorld, engine.physics_world

        Returns: None

        
metadrive/base_class/base_object.py