code: def create_code_cell(block):
          
          code_cell = nbbase.new_code_cell(source=block['content'])
  
          attr = block['attributes']
          if not attr.is_empty:
              code_cell.metadata \
                  = nbbase.NotebookNode({'attributes': attr.to_dict()})
              execution_count = attr.kvs.get('n')
              if not execution_count:
                  code_cell.execution_count = None
              else:
                  code_cell.execution_count = int(execution_count)
  
          return code_cell
docs: Create a notebook code cell from a block.