[python] add reverse groups