docstr: %aimport => Import modules for automatic reloading.
  
  %aimport
  List modules to automatically import and not to import.
  
  %aimport foo
  Import module 'foo' and mark it to be autoreloaded for %autoreload 1
  
  %aimport -foo
  Mark module 'foo' to not be autoreloaded for %autoreload 1
docstr_tok: ["%","aimport","=",">","Import","modules","for","automatic","reloading",".","%","aimport","List","modules","to","automatically","import","and","not","to","import",".","%","aimport","foo","Import","module","'foo","'","and","mark","it","to","be","autoreloaded","for","%","autoreload","1","%","aimport","-foo","Mark","module","'foo","'","to","not","be","autoreloaded","for","%","autoreload","1"]
code: def aimport(self, parameter_s="", stream=None):
      """%aimport => Import modules for automatic reloading.
  
      %aimport
      List modules to automatically import and not to import.
  
      %aimport foo
      Import module 'foo' and mark it to be autoreloaded for %autoreload 1
  
      %aimport -foo
      Mark module 'foo' to not be autoreloaded for %autoreload 1
      """
      modname = parameter_s
      if not modname:
          to_reload = sorted(self._reloader.modules.keys())
          to_skip = sorted(self._reloader.skip_modules.keys())
          if stream is None:
              stream = sys.stdout
          if self._reloader.check_all:
              stream.write("Modules to reload:\nall-except-skipped\n")
          else:
              stream.write(
                  "Modules to reload:\n%s\n" % " ".join(to_reload)
              )
          stream.write("\nModules to skip:\n%s\n" % " ".join(to_skip))
      elif modname.startswith("-"):
          modname = modname[1:]
          self._reloader.mark_module_skipped(modname)
      else:
          top_module, top_name = self._reloader.aimport_module(modname)
  
          # Inject module to user namespace
          self.shell.push({top_name: top_module})
  
imports: from __future__ import print_function
  import os
  import sys
  import traceback
  import types
  import weakref
  from IPython.utils import openpy
  from IPython.utils.py3compat import PY3
  from IPython.core.magic import Magics, magics_class, line_magic
label_desc: Use image node_id 3 for calling the AutoreloadMagics obj's underlying member method code with example usage: obj.aimport(parameter_s, stream) without return types