G7 agree on AI code of conduct and joint initiatives for Africa