You do what you do in Java, C# or any other language: define a method the class user has to call to do cleanup, and define a finializer that calls that method just in case (__del__ in this case).
Results that may be inaccessible to you are currently showing.
Hide inaccessible results