code: def create_model(self):
      types = [float] * self.num_cols
      store = Gtk.ListStore(*types)
      for row in self.data:
          # Gtk.ListStore.append is broken in PyGObject, so insert manually.
          it = store.insert(-1)
          store.set(it, {i: val for i, val in enumerate(row)})
      return store
  
file_path: matplotlib/galleries/examples/user_interfaces/gtk4_spreadsheet_sgskip.py
imports: import gi
  from gi.repository import Gtk
  from numpy.random import random
  from matplotlib.backends.backend_gtk4agg import FigureCanvas
  from matplotlib.figure import Figure
label_desc: Use image node_id 4 for calling the DataManager obj's underlying member method code with example usage: obj.create_model() and returns: store