How to create snapshot via python module?