def get_urls(session, name, data, find_changelogs_fn, **kwargs):
    """
    Gets URLs to changelogs.
    :param session: requests Session instance
    :param name: str, package name
    :param data: dict, meta data
    :param find_changelogs_fn: function, find_changelogs
    :return: tuple, (set(changelog URLs), set(repo URLs))
    """
    # if this package has valid meta data, build up a list of URL candidates we can possibly
    # search for changelogs on
    candidates = [
        url for url in
        [data.get(attr) for attr in (
            "project_uri", "homepage_uri", "wiki_uri", "documentation_uri", "mailing_list_uri",
            "source_code_uri", "bug_tracker_uri"
        )]
        if url
    ]
    return find_changelogs_fn(session=session, name=name, candidates=candidates)