Python: added ability to clone session.