def _include_module(self, module, mn):
if mn in self.topology.include_packages:<EOL><INDENT>_debug.debug("<STR_LIT>", mn)<EOL>return True<EOL><DEDENT>if '<STR_LIT:.>' in mn:<EOL><INDENT>for include_package in self.topology.include_packages:<EOL><INDENT>if mn.startswith(include_package + '<STR_LIT:.>'):<EOL><INDENT>_debug.debug("<STR_LIT>", mn,include_package + '<STR_LIT:.>')<EOL>return True<EOL><DEDENT><DEDENT><DEDENT>if mn in self.topology.exclude_packages:<EOL><INDENT>_debug.debug("<STR_LIT>", mn)<EOL>return False<EOL><DEDENT>if '<STR_LIT:.>' in mn:<EOL><INDENT>for exclude_package in self.topology.exclude_packages:<EOL><INDENT>if mn.startswith(exclude_package + '<STR_LIT:.>'):<EOL><INDENT>_debug.debug("<STR_LIT>", mn,exclude_package + '<STR_LIT:.>')<EOL>return False<EOL><DEDENT><DEDENT><DEDENT>_debug.debug("<STR_LIT>", mn)<EOL>return True<EOL>
See if a module should be included or excluded based upon
        included_packages and excluded_packages.

        As some packages have the following format:

        scipy.special.specfun
        scipy.linalg

        Where the top-level package name is just a prefix to a longer package name,
        we don't want to do a direct comparison. Instead, we want to exclude packages
        which are either exactly "<package_name>", or start with "<package_name>".