Putting all these files in my_folder
and running python -m my_folder.main
gives:
Called activity with MySpecialObject(foo='some-foo-val')
Called activity with some-other-val
And when reviewing the history, you can see the special encoding/object: