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: Print information about the magic function system.
  
  Supported formats: -latex, -brief, -rest
code: def magic(self, parameter_s=""):
      """Print information about the magic function system.
  
      Supported formats: -latex, -brief, -rest
      """
  
      mode = ""
      try:
          mode = parameter_s.split()[0][1:]
      except IndexError:
          pass
  
      brief = mode == "brief"
      rest = mode == "rest"
      magic_docs = self._magic_docs(brief, rest)
  
      if mode == "latex":
          print(self.format_latex(magic_docs))
          return
      else:
          magic_docs = format_screen(magic_docs)
  
      out = [
          """
  IPython's 'magic' functions
  ===========================
  
  The magic function system provides a series of functions which allow you to
  control the behavior of IPython itself, plus a lot of system-type
  features. There are two kinds of magics, line-oriented and cell-oriented.
  
  Line magics are prefixed with the % character and work much like OS
  command-line calls: they get as an argument the rest of the line, where
  arguments are passed without parentheses or quotes.  For example, this will
  time the given statement::
  
          %timeit range(1000)
  
  Cell magics are prefixed with a double %%, and they are functions that get as
  an argument not only the rest of the line, but also the lines below it in a
  separate argument.  These magics are called with two arguments: the rest of the
  call line and the body of the cell, consisting of the lines below the first.
  For example::
  
          %%timeit x = numpy.random.randn((100, 100))
          numpy.linalg.svd(x)
  
  will time the execution of the numpy svd routine, running the assignment of x
  as part of the setup phase, which is not timed.
  
  In a line-oriented client (the terminal or Qt console IPython), starting a new
  input with %% will automatically enter cell mode, and IPython will continue
  reading input until a blank line is given.  In the notebook, simply type the
  whole cell as one entity, but keep in mind that the %% escape can only be at
  the very start of the cell.
  
  NOTE: If you have 'automagic' enabled (via the command line option or with the
  %automagic function), you don't need to type in the % explicitly for line
  magics; cell magics always require an explicit '%%' escape.  By default,
  IPython ships with automagic on, so you should only rarely need the % escape.
  
  Example: typing '%cd mydir' (without the quotes) changes your working directory
  to 'mydir', if it exists.
  
  For a list of the available magic functions, use %lsmagic. For a description
  of any of them, type %magic_name?, e.g. '%cd?'.
  
  Currently the magic system has the following functions:""",
          magic_docs,
          "Summary of magic functions (from %slsmagic):"
          % magic_escapes["line"],
          str(self.lsmagic()),
      ]
      page.page("\n".join(out))
  
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 4 for calling the BasicMagics obj's underlying member method code with example usage: obj.magic(parameter_s) without return types