class_docstr: Base class for implementing magic functions.
  
  Shell functions which can be reached as %function_name. All magic
  functions should accept a string, which they can parse for their own
  needs. This can make some functions easier to type, eg `%cd ../`
  vs. `%cd("../")`
  
  Classes providing magic functions need to subclass this class, and they
  MUST:
  
  - Use the method decorators `@line_magic` and `@cell_magic` to decorate
    individual methods as magic functions, AND
  
  - Use the class decorator `@magics_class` to ensure that the magic
    methods are properly registered at the instance level upon instance
    initialization.
  
  See :mod:`magic_functions` for examples of actual implementation classes.
class_docstr_tok: ["Base","class","for","implementing","magic","functions",".","Shell","functions","which","can","be","reached","as","%","function_name",".","All","magic","functions","should","accept","a","string",",","which","they","can","parse","for","their","own","needs",".","This","can","make","some","functions","easier","to","type",",","eg","`","%","cd","..","\/","`","vs.","`","%","cd","(","``","..","\/","''",")","`","Classes","providing","magic","functions","need","to","subclass","this","class",",","and","they","MUST",":","-","Use","the","method","decorators","`","@","line_magic","`","and","`","@","cell_magic","`","to","decorate","individual","methods","as","magic","functions",",","AND","-","Use","the","class","decorator","`","@","magics_class","`","to","ensure","that","the","magic","methods","are","properly","registered","at","the","instance","level","upon","instance","initialization",".","See",":","mod",":","`","magic_functions","`","for","examples","of","actual","implementation","classes","."]
docstr: Print docstring if incorrect arguments were passed
docstr_tok: ["Print","docstring","if","incorrect","arguments","were","passed"]
code: def arg_err(self, func):
      """Print docstring if incorrect arguments were passed"""
      print("Error in arguments:")
      print(oinspect.getdoc(func))
  
imports: import os
  import re
  import sys
  from getopt import getopt, GetoptError
  from traitlets.config.configurable import Configurable
  from .None import oinspect
  from .error import UsageError
  from .inputtransformer2 import ESC_MAGIC, ESC_MAGIC2
  from ..utils.ipstruct import Struct
  from ..utils.process import arg_split
  from ..utils.text import dedent
  from traitlets import Bool, Dict, Instance, observe
  from logging import error
label_desc: Use image node_id 2 for calling the Magics obj's underlying member method code with example usage: obj.arg_err(func) without return types