I have a .py file with code blocks separated in cells by #%%
for example
#%%
block1
#%%
block2
This appears to be quite similar to ipynb cells; is there a quick way to convert such a python file to and from ipynb (while preserving the cells format)?