def analyze_versions(crate_data):
    """
    Analyzes the set versions across crates and returns non-matching versions.
    :param crate_data: A list of data items from `load_cargo_toml`
    :return: A dict in the form holding those dependencies with inconsistent versioning:
    {
        <dependency>: {
            <crate>: <version>,
            ...
        },
    }
    """
    dependencies = {}
    versions = {}
    # Fill datastructure first.
    for data in crate_data:
        for dependency in data['dependencies'] + data['dev-dependencies']:
            if dependency['name'] not in dependencies:
                dependencies[dependency['name']] = {}
                versions[dependency['name']] = set()
            dependencies[dependency['name']][data['name']] = dependency['version']
            versions[dependency['name']].add(dependency['version'])

    for (dependency, version_set) in versions.items():
        if len(version_set) == 1:
            dependencies.pop(dependency)

    return dependencies