def __init__(self, package_name, version_range=None, paths=None, verbose=False):
self.package = None<EOL>self._verbose = verbose<EOL>self._sections = []<EOL>package = None<EOL>it = iter_packages(package_name, range_=version_range)<EOL>packages = sorted(it, key=lambda x: x.version, reverse=True)<EOL>for package_ in packages:<EOL><INDENT>if self._verbose:<EOL><INDENT>print("<STR_LIT>" % package_.uri)<EOL><DEDENT>if package_.help:<EOL><INDENT>package = package_<EOL>break<EOL><DEDENT><DEDENT>if package:<EOL><INDENT>help_ = package.help<EOL>if isinstance(help_, str):<EOL><INDENT>sections = [["<STR_LIT>", help_]]<EOL><DEDENT>elif isinstance(help_, list):<EOL><INDENT>sections = help_<EOL><DEDENT>if self._verbose:<EOL><INDENT>print("<STR_LIT>" % (len(sections), package.uri))<EOL><DEDENT>if package.num_variants == <NUM_LIT:0>:<EOL><INDENT>base = package.base<EOL>root = base<EOL><DEDENT>else:<EOL><INDENT>variant = package.get_variant(<NUM_LIT:0>)<EOL>base = variant.base<EOL>root = variant.root<EOL><DEDENT>formatter = scoped_formatter(<EOL>base=base,<EOL>root=root,<EOL>config=config,<EOL>version=VersionBinding(package.version),<EOL>system=system)<EOL>for section in sections:<EOL><INDENT>uri = section[<NUM_LIT:1>]<EOL>uri = convert_old_command_expansions(uri)<EOL>uri = uri.replace("<STR_LIT>", "<STR_LIT>").strip()<EOL>uri = formatter.format(uri)<EOL>section[<NUM_LIT:1>] = uri<EOL><DEDENT>self.package = package<EOL>self._sections = sections<EOL><DEDENT>
Create a PackageHelp object.

        Args:
            package_name (str): Package to search.
            version_range (`VersionRange`): Versions to search.