code: def restore_aliases(ip, alias=None):
      staliases = ip.db.get("stored_aliases", {})
      if alias is None:
          for k, v in staliases.items():
              # print "restore alias",k,v # dbg
              # self.alias_table[k] = v
              ip.alias_manager.define_alias(k, v)
      else:
          ip.alias_manager.define_alias(alias, staliases[alias])
  
file_path: catboost/contrib/python/ipython/py3/IPython/extensions/storemagic.py
imports: import inspect, os, sys, textwrap
  from IPython.core.error import UsageError
  from IPython.core.magic import Magics, magics_class, line_magic
  from IPython.testing.skipdoctest import skip_doctest
  from traitlets import Bool
label_desc: Use image node_id 1 for calling a global function with example usage: restore_aliases(ip, alias) without return types