def source_mapper(source, package):
    """
    Add vcs_url from source tag, if present. Typically only present in
    composer.lock
    """
    tool = source.get('type')
    if not tool:
        return package
    url = source.get('url')
    if not url:
        return package
    version = source.get('reference')
    package.vcs_url = '{tool}+{url}@{version}'.format(**locals())
    return package