def _add_dependency(self, module, mn):
_debug.debug("<STR_LIT>", mn)<EOL>if _is_streamsx_module(module):<EOL><INDENT>_debug.debug("<STR_LIT>", mn)<EOL>return False<EOL><DEDENT>if _is_builtin_module(module):<EOL><INDENT>_debug.debug("<STR_LIT>", mn)<EOL>return False<EOL><DEDENT>if not self._include_module(module, mn):<EOL><INDENT>return False<EOL><DEDENT>package_name = _get_package_name(module)<EOL>top_package_name = module.__name__.split('<STR_LIT:.>')[<NUM_LIT:0>]<EOL>if package_name and top_package_name in sys.modules:<EOL><INDENT>top_package = sys.modules[top_package_name]<EOL>if "<STR_LIT>" in top_package.__dict__:<EOL><INDENT>seen_non_site_package = False<EOL>for top_package_path in reversed(list(top_package.__path__)):<EOL><INDENT>top_package_path = os.path.abspath(top_package_path)<EOL>if '<STR_LIT>' in top_package_path:<EOL><INDENT>continue<EOL><DEDENT>seen_non_site_package = True<EOL>self._add_package(top_package_path)<EOL><DEDENT>if not seen_non_site_package:<EOL><INDENT>_debug.debug("<STR_LIT>", mn)<EOL>return False<EOL><DEDENT><DEDENT>elif hasattr(top_package, '<STR_LIT>'):<EOL><INDENT>if '<STR_LIT>' in top_package.__file__:<EOL><INDENT>_debug.debug("<STR_LIT>", mn)<EOL>return False<EOL><DEDENT>self._add_package(os.path.abspath(top_package.__file__))<EOL><DEDENT><DEDENT>elif hasattr(module, '<STR_LIT>'):<EOL><INDENT>module_path = os.path.abspath(module.__file__)<EOL>if '<STR_LIT>' in module_path:<EOL><INDENT>_debug.debug("<STR_LIT>", mn)<EOL>return False<EOL><DEDENT>self._modules.add(module_path)<EOL><DEDENT>self._processed_modules.add(module)<EOL>return True<EOL>
Adds a module to the list of dependencies
without handling the modules dependences.

Modules in site-packages are excluded from being added into
the toolkit. This mimics dill.