code: def unpartial_imports(index: Union["Index", "IndexView"]) -> int:
      """Update any outs in the index which are no longer partial imports.
  
      Returns:
          Total number of files which were unpartialed.
      """
      from dvc_data.hashfile.hash_info import HashInfo
      from dvc_data.hashfile.meta import Meta
  
      updated = 0
      for out in index.outs:
          # we need to use view[key] here and since the out fields have not been
          # updated yet (out.get_entry() would return the partial-import state)
          workspace, key = out.index_key
          entry = index.data[workspace][key]
          if out.stage.is_partial_import:
              out.hash_info = entry.hash_info or HashInfo()
              out.meta = entry.meta or Meta()
              out.stage.md5 = out.stage.compute_md5()
              out.stage.dump()
              updated += (
                  out.meta.nfiles if out.meta.nfiles is not None else 1
              )
      return updated
  
file_path: dvc/dvc/repo/imports.py
imports: import os
  from functools import partial
  from tempfile import TemporaryDirectory
  from typing import TYPE_CHECKING, List, Set, Tuple, Union
  from dvc.log import logger
label_desc: Use image node_id 3 for calling a global function with example usage: unpartial_imports(index) and returns: updated