code: def test_update_fetch_all(path=None):
      path = Path(path)
      remote_1 = str(path / "remote_1")
      remote_2 = str(path / "remote_2")
  
      ds = Dataset(path / "src").create()
      src = ds.repo.path
  
      ds_rmt1 = clone(source=src, path=remote_1)
      ds_rmt2 = clone(source=src, path=remote_2)
  
      ds.siblings("add", name="sibling_1", url=remote_1)
      ds.siblings("add", name="sibling_2", url=remote_2)
  
      # modify the remotes:
      (ds_rmt1.pathobj / "first.txt").write_text("some file load")
      ds_rmt1.save()
  
      # TODO: Modify an already present file!
  
      (ds_rmt2.pathobj / "second.txt").write_text("different file load")
      ds_rmt2.save()
  
      # Let's init some special remote which we couldn't really update/fetch
      if not dl_cfg.get("datalad.tests.dataladremote"):
          ds.repo.init_remote(
              "datalad",
              [
                  "encryption=none",
                  "type=external",
                  "externaltype=datalad",
              ],
          )
      # fetch all remotes
      assert_result_count(ds.update(), 1, status="ok", type="dataset")
  
      # no merge, so changes are not in active branch:
      assert_not_in(
          "first.txt", ds.repo.get_files(ds.repo.get_active_branch())
      )
      assert_not_in(
          "second.txt", ds.repo.get_files(ds.repo.get_active_branch())
      )
      # but we know the changes in remote branches:
      assert_in(
          "first.txt", ds.repo.get_files("sibling_1/" + DEFAULT_BRANCH)
      )
      assert_in(
          "second.txt", ds.repo.get_files("sibling_2/" + DEFAULT_BRANCH)
      )
  
      # no merge strategy for multiple remotes yet:
      # more clever now, there is a tracking branch that provides a remote
      # assert_raises(NotImplementedError, ds.update, merge=True)
  
      # merge a certain remote:
      assert_result_count(
          ds.update(sibling="sibling_1", merge=True),
          1,
          action="update",
          status="ok",
          type="dataset",
      )
  
      # changes from sibling_2 still not present:
      assert_not_in(
          "second.txt", ds.repo.get_files(ds.repo.get_active_branch())
      )
      # changes from sibling_1 merged:
      assert_in(
          "first.txt", ds.repo.get_files(ds.repo.get_active_branch())
      )
      # it's known to annex, but has no content yet:
      annexprops = ds.repo.get_file_annexinfo(
          "first.txt", eval_availability=True
      )
      annexprops["key"]  # blows if unknown
      eq_(False, annexprops["has_content"])
  
imports: import os
  import os.path
  from os.path import exists
  from os.path import join
  from unittest.mock import patch
  import pytest
  from datalad import cfg
  from datalad.api import clone, install, remove, update
  from datalad.distribution.update import _process_how_args
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.external_versions import external_versions
  from datalad.support.gitrepo import GitRepo
  from datalad.tests.utils_pytest import DEFAULT_BRANCH, DEFAULT_REMOTE, SkipTest, assert_false, assert_in, assert_in_results, assert_is_instance, assert_not_in, assert_raises, assert_repo_status, assert_result_count, assert_status, create_tree, eq_, known_failure_windows, maybe_adjust_repo, neq_, ok_, ok_file_has_content, skip_if_adjusted_branch, slow, with_tempfile
  from datalad.utils import Path, chpwd, knows_annex, rmtree
  from ..dataset import Dataset
label_desc: Use image node_id 3 for calling a global function with example usage: test_update_fetch_all(path) without return types