docs: def _add_dependency(self, module, mn):
          """
          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.
          """
          _debug.debug("_add_dependency:module=%s", mn)
  
          if _is_streamsx_module(module):
              _debug.debug("_add_dependency:streamsx module=%s", mn)
              return False
  
          if _is_builtin_module(module):
              _debug.debug("_add_dependency:builtin module=%s", mn)
              return False
  
          if not self._include_module(module, mn):
            #print ("ignoring dependencies for {0} {1}".format(module.__name__, module))
            return False
  
          package_name = _get_package_name(module)
          top_package_name = module.__name__.split('.')[0]
  
          if package_name and top_package_name in sys.modules:
              # module is part of a package
              # get the top-level package
              top_package = sys.modules[top_package_name]
  
              if "__path__" in top_package.__dict__:
                  # for regular packages, there is one top-level directory
                  # for namespace packages, there can be more than one.
                  # they will be merged in the bundle
                  seen_non_site_package = False
                  for top_package_path in reversed(list(top_package.__path__)):
                      top_package_path = os.path.abspath(top_package_path)
                      if 'site-packages' in top_package_path:
                          continue
                      seen_non_site_package = True
                      self._add_package(top_package_path)
                  if not seen_non_site_package:
                      _debug.debug("_add_dependency:site-packages path module=%s", mn)
                      return False
              elif hasattr(top_package, '__file__'):
                  # package that is an individual python file with empty __path__
                  if 'site-packages' in top_package.__file__:
                      _debug.debug("_add_dependency:site-packages module=%s", mn)
                      return False
                  self._add_package(os.path.abspath(top_package.__file__))
          elif hasattr(module, '__file__'):
              # individual Python module
              module_path = os.path.abspath(module.__file__)
              if 'site-packages' in module_path:
                  _debug.debug("_add_dependency:site-packages module=%s", mn)
                  return False
              self._modules.add(module_path)
              
          self._processed_modules.add(module)
          return True