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: Switch modes for the exception handlers.
  
  Valid modes: Plain, Context and Verbose.
  
  If called without arguments, acts as a toggle.
code: def xmode(self, parameter_s=""):
      """Switch modes for the exception handlers.
  
      Valid modes: Plain, Context and Verbose.
  
      If called without arguments, acts as a toggle."""
  
      def xmode_switch_err(name):
          warn(
              "Error changing %s exception modes.\n%s"
              % (name, sys.exc_info()[1])
          )
  
      shell = self.shell
      new_mode = parameter_s.strip().capitalize()
      try:
          shell.InteractiveTB.set_mode(mode=new_mode)
          print("Exception reporting mode:", shell.InteractiveTB.mode)
      except:
          xmode_switch_err("user")
  
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 9 for calling the BasicMagics obj's underlying member method code with example usage: obj.xmode(parameter_s) without return types