code: def code_from_ipynb(nb, markdown=False):
      
      code = PREAMBLE
      for cell in nb['cells']:
          if cell['cell_type'] == 'code':
              # transform the input to executable Python
              code += ''.join(cell['source'])
          if cell['cell_type'] == 'markdown':
              code += '\n# ' + '# '.join(cell['source'])
          # We want a blank newline after each cell's output.
          # And the last line of source doesn't have a newline usually.
          code += '\n\n'
      return code
docs: Get the code for a given notebook
  
      nb is passed in as a dictionary that's a parsed ipynb file