def _get_updated_tags(update_function, *args):
    """Get an updated list of tags.

    :param update_function: The function used to update tags.
    :param args: (The resource :py:class:`dict` to get updated tags for., The tags :py:class:`list` to update ``resource`` with.)
    :rtype: :py:class:`list`

    If the tag list update function modifies the existing tag list then that new list is returned.  In all other cases
    None is returned.

    """
    updated_tags = None
    resource, tags = args[:2]
    existing_tags = resource.get('tags')
    if existing_tags is not None:
        existing_tags_set = set(existing_tags)
        tags_set = set(tags)
        updated_tags_set = update_function(existing_tags_set, tags_set)
        if existing_tags_set != updated_tags_set:
            updated_tags = list(updated_tags_set)
    return updated_tags
