code: def get_plugin_data(self, plugin):
          
          # The data object is named "data" in the editor plugin while it is
          # named "clients" in the notebook plugin.
          try:
              data = plugin.get_current_tab_manager().data
          except AttributeError:
              data = plugin.get_current_tab_manager().clients
  
          return data
docs: Get the data object of the plugin's current tab manager.