def magic(self, arg_s):
    "\n        DEPRECATED\n\n        Deprecated since IPython 0.13 (warning added in\n        8.1), use run_line_magic(magic_name, parameter_s).\n\n        Call a magic function by name.\n\n        Input: a string containing the name of the magic function to call and\n        any additional arguments to be passed to the magic.\n\n        magic('name -opt foo bar') is equivalent to typing at the ipython\n        prompt:\n\n        In[1]: %name -opt foo bar\n\n        To call a magic without arguments, simply use magic('name').\n\n        This provides a proper Python function to call IPython's magics in any\n        valid Python code you can type at the interpreter, including loops and\n        compound statements.\n        "
    warnings.warn('`magic(...)` is deprecated since IPython 0.13 (warning added in 8.1), use run_line_magic(magic_name, parameter_s).', DeprecationWarning, stacklevel=2)
    (magic_name, _, magic_arg_s) = arg_s.partition(' ')
    magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
    return self.run_line_magic(magic_name, magic_arg_s, _stack_depth=2)
DEPRECATED

Deprecated since IPython 0.13 (warning added in
8.1), use run_line_magic(magic_name, parameter_s).

Call a magic function by name.

Input: a string containing the name of the magic function to call and
any additional arguments to be passed to the magic.

magic('name -opt foo bar') is equivalent to typing at the ipython
prompt:

In[1]: %name -opt foo bar

To call a magic without arguments, simply use magic('name').

This provides a proper Python function to call IPython's magics in any
valid Python code you can type at the interpreter, including loops and
compound statements.
def magic(self, arg_s):
    "\n        DEPRECATED\n\n        Deprecated since IPython 0.13 (warning added in\n        8.1), use run_line_magic(magic_name, parameter_s).\n\n        Call a magic function by name.\n\n        Input: a string containing the name of the magic function to call and\n        any additional arguments to be passed to the magic.\n\n        magic('name -opt foo bar') is equivalent to typing at the ipython\n        prompt:\n\n        In[1]: %name -opt foo bar\n\n        To call a magic without arguments, simply use magic('name').\n\n        This provides a proper Python function to call IPython's magics in any\n        valid Python code you can type at the interpreter, including loops and\n        compound statements.\n        "
    warnings.warn('`magic(...)` is deprecated since IPython 0.13 (warning added in 8.1), use run_line_magic(magic_name, parameter_s).', DeprecationWarning, stacklevel=2)
    (magic_name, _, magic_arg_s) = arg_s.partition(' ')
    magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
    return self.run_line_magic(magic_name, magic_arg_s, _stack_depth=2)