def METHOD_NAME(nb):
    """
    Create a copy of a notebook with solutions and outputs stripped.
    Args:
        nb (``nbformat.NotebookNode``): the notebook to strip
    Returns:
        ``nbformat.NotebookNode``: a stripped copy of ``nb``
    """
    nb = copy.deepcopy(nb)
    md_solutions = []
    lang = get_notebook_language(nb)
    for i, cell in enumerate(nb['cells']):
        if has_tag(cell, SOLUTION_CELL_TAG):
            if is_cell_type(cell, "code"):
                cell['source'] = '\n'.join(replace_solutions(get_source(cell), lang))
            elif is_cell_type(cell, "markdown"):
                md_solutions.append(i)
            nb['cells'][i] = remove_tag(cell, SOLUTION_CELL_TAG)
    md_solutions.reverse()
    for i in md_solutions:
        del nb['cells'][i]
    # remove output from student version
    remove_output(nb)
    return nb