How to get predecessor Cell Content in custom kernel?

Hi I am working on customizing kernel , initial copy from GitHub - ipython/ipykernel: IPython Kernel for Jupyter. My goal is simple Cell[0] contents markdown data say " ### Header" when i move to Cell[1] content is python say “convert_md_to_html()” function. I need to input this Cell[0] content to Cell[1] in Kernel backend, nothing to be duplicated in notebook. Is there way we can do it?

I see there is cell_id but not clear with API. I am hoping something like. "CurrentNotebook.Cells[cell_id].get_content() in kernel. Can you help with API?
Appreciate your help in advance.
Thank you.

found it cell_magics