'Create a PackageFinder.
:param format_control: A FormatControl object or None. Used to control
the selection of source packages / binary packages when consulting
the index and links.'

def __init__(self, find_links, index_urls, allow_all_prereleases=False, trusted_hosts=None, process_dependency_links=False, session=None, format_control=None):

    if (session is None):
        raise TypeError("PackageFinder()    missing    1    required    keyword    argument:    'session'")
    self.find_links = []
    for link in find_links:
        if link.startswith('~'):
            new_link = normalize_path(link)
            if os.path.exists(new_link):
                link = new_link
        self.find_links.append(link)
    self.index_urls = index_urls
    self.dependency_links = []
    self.logged_links = set()
    self.format_control = (format_control or FormatControl(set(), set()))
    self.secure_origins = [('*', host, '*') for host in (trusted_hosts if trusted_hosts else [])]
    self.allow_all_prereleases = allow_all_prereleases
    self.process_dependency_links = process_dependency_links
    self.session = session
    if (not HAS_TLS):
        for link in itertools.chain(self.index_urls, self.find_links):
            parsed = urllib_parse.urlparse(link)
            if (parsed.scheme == 'https'):
                logger.warning('pip    is    configured    with    locations    that    require    TLS/SSL,    however    the    ssl    module    in    Python    is    not    available.')
                break
