How to add a custom type to dill's pickleable types
问题 I'm trying to serialize some code I did not write and cannot modify that needs to be pickled/dilled. The script contains a mongodb collection object---it isn't actually used later, but dilling it is throwing an error. When I try dilling it, I receive the error: Collection object is not callable. If you meant to call __getnewargs__ method on a 'Database' object it is failing because no such method exists. I see code here that is enumerating the accepted types: https://github.com/uqfoundation