code: def _update_meta(index, **kwargs):
      from dvc.repo.worktree import (
          _merge_push_meta,
          worktree_view_by_remotes,
      )
  
      stages = set()
      for remote_name, idx in worktree_view_by_remotes(
          index, push=True, **kwargs
      ):
          remote = index.repo.cloud.get_remote(remote_name)
  
          if not remote.fs.version_aware:
              continue
  
          with ui.progress(
              desc=f"Collecting {remote.path} on {remote.fs.protocol}",
              unit="entry",
              leave=True,
          ) as pb:
              cb = pb.as_callback()
              new = _rebuild(
                  idx.data["repo"], remote.path, remote.fs, cb
              )
  
          for out in idx.outs:
              _merge_push_meta(out, new, remote.name)
              stages.add(out.stage)
  
      for stage in stages:
          stage.dump(with_files=True, update_pipeline=False)
  
imports: from contextlib import suppress
  from dvc.exceptions import InvalidArgumentError, UploadError
  from dvc.ui import ui
  from .None import locked
label_desc: Use image node_id 2 for calling a global function with example usage: _update_meta(index) without return types