class_docstr: Magics that provide central IPython functionality.
  
  These are various magics that don't fit into specific categories but that
  are all part of the base 'IPython experience'.
docstr: Export and convert IPython notebooks.
  
  This function can export the current IPython history to a notebook file.
  For example, to export the history to "foo.ipynb" do "%notebook foo.ipynb".
  
  The -e or --export flag is deprecated in IPython 5.2, and will be
  removed in the future.
code: def notebook(self, s):
      """Export and convert IPython notebooks.
  
      This function can export the current IPython history to a notebook file.
      For example, to export the history to "foo.ipynb" do "%notebook foo.ipynb".
  
      The -e or --export flag is deprecated in IPython 5.2, and will be
      removed in the future.
      """
      args = magic_arguments.parse_argstring(self.notebook, s)
  
      from nbformat import write, v4
  
      cells = []
      hist = list(self.shell.history_manager.get_range())
      if len(hist) <= 1:
          raise ValueError("History is empty, cannot export")
      for session, execution_count, source in hist[:-1]:
          cells.append(
              v4.new_code_cell(
                  execution_count=execution_count, source=source
              )
          )
      nb = v4.new_notebook(cells=cells)
      with io.open(args.filename, "w", encoding="utf-8") as f:
          write(nb, f, version=4)
  
imports: from __future__ import print_function
  from __future__ import absolute_import
  import argparse
  import io
  import sys
  from pprint import pformat
  from IPython.core import magic_arguments, page
  from IPython.core.error import UsageError
  from IPython.core.magic import Magics, magics_class, line_magic, magic_escapes
  from IPython.utils.text import format_screen, dedent, indent
  from IPython.testing.skipdoctest import skip_doctest
  from IPython.utils.ipstruct import Struct
  from IPython.utils.py3compat import unicode_type
  from warnings import warn
  from logging import error
label_desc: Use image node_id 14 for calling the BasicMagics obj's underlying member method code with example usage: obj.notebook(s) without return types