Returns a mapping from absolute source path to absolute output path as specified
        by the sources object. Files are not guaranteed to exist.

def resolve_source_mapping(
    source_directory: str, output_directory: str, sources: Sources
) -> Mapping[str, str]:
    """
        Returns a mapping from absolute source path to absolute output path as specified
        by the sources object. Files are not guaranteed to exist.
    """
    result = {
        os.path.join(source_directory, source_file): os.path.join(
            output_directory, output_file
        )
        for source_file, output_file in sources.files.items()
    }

    filesystem = get_filesystem()
    for glob in sources.globs:
        matches = filesystem.list(source_directory, glob.patterns, exclude=glob.exclude)
        result.update(
            {
                os.path.join(source_directory, match): os.path.join(
                    output_directory, match
                )
                for match in matches
            }
        )
    return result