from gi.repository import Gtk # Create the ActionGroup action_group = Gtk.ActionGroup("example_actions") # Add some actions to the group action_group.add_actions([ ("New", None, "New", None, "Create a new document", callback), ("Open", None, "Open", None, "Open an existing document", callback), ("Save", None, "Save", None, "Save the current document", callback), ("SaveAs", None, "Save As", None, "Save the current document with a new name", callback), ]) # Create a toolbar with buttons for each action toolbar = Gtk.Toolbar() for action in action_group.list_actions(): item = action.create_tool_item() toolbar.add(item) # Add the toolbar to a window window.add(toolbar)In this example, the ActionGroup is created with the name "example_actions". A set of actions are then added to the group using the `add_actions()` method. Each action is defined with a name, icon, label, tooltip, and callback function. Finally, a toolbar is created and populated with buttons for each action using the `create_tool_item()` method. The toolbar is then added to a window. Overall, the Gtk ActionGroup is a useful tool for managing sets of related actions in a graphical user interface.