def get_notebook_title(nb_json, default=None):
    """Determine a suitable title for the notebook.

    This will return the text of the first header cell.
    If that does not exist, it will return the default.
    """
    cells = nb_json['cells']
    for cell in cells:
        if cell['cell_type'] == 'heading':
            return cell['source']
    return default