code: def _diff_index_to_wtree(
      repo: "Repo", **kwargs: Any
  ) -> Dict[str, List[str]]:
      from .index import build_data_index
  
      with ui.progress(
          desc="Building workspace index",
          unit="entry",
      ) as pb:
          workspace = build_data_index(
              repo.index,
              repo.root_dir,
              repo.fs,
              compute_hash=True,
              callback=pb.as_callback(),
          )
  
      with ui.progress(
          desc="Calculating diff between index/workspace",
          unit="entry",
      ) as pb:
          return _diff(
              repo.index.data["repo"],
              workspace,
              not_in_cache=True,
              callback=pb.as_callback(),
              **kwargs,
          )
  
file_path: dvc/dvc/repo/data.py
imports: import os
  import posixpath
  from typing import TYPE_CHECKING, Any, Dict, Iterable, List, TypedDict, Union
  from dvc.fs.callbacks import DEFAULT_CALLBACK
  from dvc.ui import ui
label_desc: Use image node_id 6 for calling a global function with example usage: _diff_index_to_wtree(repo) and returns: _diff