class_docstr: Object that handles all magic-related functionality for IPython.
      
class_docstr_tok: ["Object","that","handles","all","magic-related","functionality","for","IPython","."]
docstr: Register an alias to a magic function.
  
  The alias is an instance of :class:`MagicAlias`, which holds the
  name and kind of the magic it should call. Binding is done at
  call time, so if the underlying magic function is changed the alias
  will call the new function.
  
  Parameters
  ----------
  alias_name : str
    The name of the magic to be registered.
  
  magic_name : str
    The name of an existing magic.
  
  magic_kind : str
    Kind of magic, one of 'line' or 'cell'
docstr_tok: ["Register","an","alias","to","a","magic","function",".","The","alias","is","an","instance","of",":","class",":","`","MagicAlias","`",",","which","holds","the","name","and","kind","of","the","magic","it","should","call",".","Binding","is","done","at","call","time",",","so","if","the","underlying","magic","function","is","changed","the","alias","will","call","the","new","function",".","Parameters","--","--","--","--","--","alias_name",":","str","The","name","of","the","magic","to","be","registered",".","magic_name",":","str","The","name","of","an","existing","magic",".","magic_kind",":","str","Kind","of","magic",",","one","of","'line","'","or","'cell","'"]
code: def register_alias(self, alias_name, magic_name, magic_kind="line"):
      """Register an alias to a magic function.
  
      The alias is an instance of :class:`MagicAlias`, which holds the
      name and kind of the magic it should call. Binding is done at
      call time, so if the underlying magic function is changed the alias
      will call the new function.
  
      Parameters
      ----------
      alias_name : str
        The name of the magic to be registered.
  
      magic_name : str
        The name of an existing magic.
  
      magic_kind : str
        Kind of magic, one of 'line' or 'cell'
      """
  
      # `validate_type` is too permissive, as it allows 'line_cell'
      # which we do not handle.
      if magic_kind not in magic_kinds:
          raise ValueError(
              "magic_kind must be one of %s, %s given" % magic_kinds,
              magic_kind,
          )
  
      alias = MagicAlias(self.shell, magic_name, magic_kind)
      setattr(self.user_magics, alias_name, alias)
      record_magic(self.magics, magic_kind, alias_name, alias)
  
imports: from __future__ import print_function
  import os
  import re
  import sys
  import types
  from getopt import getopt, GetoptError
  from traitlets.config.configurable import Configurable
  from IPython.core import oinspect
  from IPython.core.error import UsageError
  from IPython.core.inputsplitter import ESC_MAGIC, ESC_MAGIC2
  from decorator import decorator
  from IPython.utils.ipstruct import Struct
  from IPython.utils.process import arg_split
  from IPython.utils.py3compat import string_types, iteritems
  from IPython.utils.text import dedent
  from traitlets import Bool, Dict, Instance, observe
  from logging import error
label_desc: Use image node_id 8 for calling the MagicsManager obj's underlying member method code with example usage: obj.register_alias(alias_name, magic_name, magic_kind) without return types