WASHINGTON — In one of his last major appearances on the world stage, President Barack Obama will try to define how his leadership has made the planet safer and more prosperous when he gives his farewell speech to the U.N. General Assembly on Tuesday.Obama’s challenge at the annual gathering of world leaders is to cast the past eight years as ones of overall progress, without glossing over the profound problems that have eluded his diplomacy. His successes in galvanizing action on climate change and encouraging democratic changes in Cuba and Myanmar are tempered by crises across the Middle East and North Korea’s nuclear threat, which has only strengthened.Obama’s U.N. ambassador, Samantha Power, said that when Obama came into office in early 2009, the U.S. was isolated. She said Obama had told fellow leaders he planned a “new era of engagement” that recognized countries must address common threats together.“I think it’s hard to overstate the transformative effect that this approach has had,” Power said.After raising money for Democrats on Sunday in New York, Obama planned to open his week of diplomacy by meeting with Iraq’s prime minister, Haider al-Abadi, on Monday. Obama is counting on the Baghdad government to bridge sectarian divides and help fight the Islamic State group.On Tuesday, Obama will deliver his U.N. address, attend a lunch with Secretary-General Ban Ki-moon, meet with CEOs and host a summit on refugees. The U.S. has urged other nations to take in more migrants and help address the unprecedented refugee crisis stemming from Syria’s civil war.