docs: def list_to_cells(lst):
      '''convert list of cells to notebook form
      list should be of the form:
      [[list of strings representing python code for cell]]
      '''
      cells = '"cells": ['
      for cell in lst:
          to_add = '{"cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": ["' + '\\n","'.join(cell) + '"]},'
          cells += to_add
  
      cells = cells[:-1] + '],'
  
      nb = '{' + cells + '"metadata": {"header": "HEADLESS", "kernelspec": {"display_name" : "python", "language": "", "name": "python"}, "language":"python"'
  
      return nbformat.writes(nbformat.reads(nb, as_version=4)).encode('utf-8')