python helpers