def METHOD_NAME(kernelspec: Mapping[str, str]):
    check.mapping_param(kernelspec, "kernelspec", key_type=str, value_type=str)
    notebook = nbformat.v4.new_notebook()
    notebook.cells = [get_import_cell(), get_parameters_cell()]
    metadata = {"celltoolbar": "Tags", "kernelspec": kernelspec}
    notebook.metadata = metadata
    return nbformat.writes(notebook)