code: def test_remote_modify_default(dvc):
      remote_repo = "repo_level"
      remote_local = "local_level"
      wrong_name = "anything"
      assert (
          main(["remote", "add", remote_repo, "s3://bucket/repo"]) == 0
      )
      assert (
          main(["remote", "add", remote_local, "s3://bucket/local"])
          == 0
      )
  
      assert main(["remote", "default", wrong_name]) == 251
      assert main(["remote", "default", remote_repo]) == 0
      assert main(["remote", "default", "--local", remote_local]) == 0
  
      repo_config = configobj.ConfigObj(dvc.config.files["repo"])
      local_config = configobj.ConfigObj(dvc.config.files["local"])
  
      assert repo_config["core"]["remote"] == remote_repo
      assert local_config["core"]["remote"] == remote_local
  
imports: import errno
  import itertools
  import os
  import stat
  import configobj
  import pytest
  from dvc.cli import main
  from dvc.config import Config
  from dvc.exceptions import DownloadError, UploadError
  from dvc.utils.fs import remove
label_desc: Use image node_id 18 for calling a global function with example usage: test_remote_modify_default(dvc) without return types