The former prime minister left Parliament with a message on leadership and an acknowledgement of the greatest challenges she faced.