'Initialize package for parsing
Parameters
package_name : string
Name of the top-level package.  *package_name* must be the
name of an importable package
rst_extension : string, optional
Extension for reST files, default \'.rst\'
package_skip_patterns : None or sequence of {strings, regexps}
Sequence of strings giving URIs of packages to be excluded
Operates on the package path, starting at (including) the
first dot in the package path, after *package_name* - so,
if *package_name* is ``sphinx``, then ``sphinx.util`` will
result in ``.util`` being passed for earching by these
regexps.  If is None, gives default. Default is:
[\'\.tests$\']
module_skip_patterns : None or sequence
Sequence of strings giving URIs of modules to be excluded
Operates on the module name including preceding URI path,
back to the first dot after *package_name*.  For example
``sphinx.util.console`` results in the string to search of
``.util.console``
If is None, gives default. Default is:
[\'\.setup$\', \'\._\']
names_from__all__ : set, optional
Modules listed in here will be scanned by doing ``from mod import *``,
rather than finding function and class definitions by scanning the
AST. This is intended for API modules which expose things defined in
other files. Modules listed here must define ``__all__`` to avoid
exposing everything they import.'

def __init__(self, package_name, rst_extension='.rst', package_skip_patterns=None, module_skip_patterns=None, names_from__all__=None):

    if (package_skip_patterns is None):
        package_skip_patterns = ['\\.tests$']
    if (module_skip_patterns is None):
        module_skip_patterns = ['\\.setup$', '\\._']
    self.package_name = package_name
    self.rst_extension = rst_extension
    self.package_skip_patterns = package_skip_patterns
    self.module_skip_patterns = module_skip_patterns
    self.names_from__all__ = (names_from__all__ or set())
