docs: def find_changelogs(session, name, candidates):
      """
      Tries to find changelogs on the given URL candidates
      :param session: requests Session instance
      :param name: str, project name
      :param candidates: list, URL candidates
      :return: tuple, (set(changelog URLs), set(repo URLs))
      """
      repos = filter_repo_urls(candidates=candidates)
      # if we are lucky and there isn't a valid repo URL in our URL candidates, we need to go deeper
      # and check the URLs if they contain a link to a repo
      if not repos:
          logger.info("No repo found, trying to find one on related sites {}".format(candidates))
          repos = set(find_repo_urls(session, name, candidates))
  
      urls = []
      for repo in repos:
          for url in find_changelog(session, repo):
              if not contains_project_name(name, url):
                  logger.debug("Found changelog on {url}, but it does not contain the project name "
                               "{name}, ""aborting".format(name=name, url=url))
                  continue
              urls.append(url)
  
      if not urls:
          # at this point we failed to fetch a changelog from plain files. we might find one on the
          # github release page.
          logger.debug("No plain changelog urls found, trying release page")
          for repo in repos:
              # make sure the link to the release page contains the project name
              if contains_project_name(name, repo):
                  for url in find_release_page(session, repo):
                      urls.append(url)
      return set(urls), repos