def get_package_breadcrumbs(package_tree, name, version):
    """
    Takes a npm ls JSON tree and looks up the paths to the given
    dependency (name and version).

    Returns an array of paths. Where a path is an array of
    dependencies leading to the given dependency in the tree.

        >>> get_package_breadcrumbs(tree, 'minim', '1.0.0')
        [
            ['fury-adapter-swagger@1.0.0'],
            ['fury@2.0.0'],
            ['apielements@0.1.0', 'fury@2.0.0']
        ]
    """

    def traverse_dependencies(dependencies, path):
        """
        Inline function to be called recursively to check for dependency and
        pass down the path to further dependencies.
        """

        results = []

        for dependency_name in dependencies:
            dependency = dependencies[dependency_name]

            if dependency_name == name and dependency.get('version') == version:
                # Found dependency in path
                results.append(path)
                continue

            if 'dependencies' in dependency:
                # Traverse dependency dependencies
                sub_dependencies = dependency['dependencies']
                path_component = '{}@{}'.format(dependency_name, dependency['version'])
                results += traverse_dependencies(sub_dependencies, path + [path_component])

        return results

    return traverse_dependencies(package_tree['dependencies'], [])