Some inspiration for helping fossil-fuel-producing countries transition to cleaner energy could come from Brazil and Norway.