Allow dump and load from python