Model.metadata.get is not a function

I’m trying to read the tags for the specific cell in JupyterLab but getting model.metadata.get is not a function Uncaught TypeError: saying model.metadata.get is not a function.
I can print this model.metadata in the console and it’s an IObersableJSON object.

the API has changed in this respect between jlab 3 and 4

you should now use model.getMetadata()
as well as similarly setMetadata() and deleteMetadata()