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", magic_params=None
  ):
      """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, magic_params
      )
      setattr(self.user_magics, alias_name, alias)
      record_magic(self.magics, magic_kind, alias_name, alias)
  
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 9 for calling the MagicsManager obj's underlying member method code with example usage: obj.register_alias(alias_name, magic_name, magic_kind, magic_params) without return types