Having a JuptyerLab Extension force a notebook to save

I am develoing a JupyterLab extension that modifies notebook metadata and I want to force a save immediately after the metadata has been modified. In Jupyter classic this was Jupyter.notebook.save_notebook(); but in JupyterLab I have not been able to find an equivalent function call. I am doing this in the context of a button on the notebook panel, so generically the button is defined as such.

class ButtonExtension implements DocumentRegistry.IWidgetExtension<NotebookPanel, INotebookModel> {

I have the buttons appearing and firing actions, modifying the metadata, but I can’t force the save. Any thoughts would be appreciated.

It looks like there is a save() method in the context object, maybe you can use this?

Thanks! I completely overlooked that but that was the answer.