code: def test_config_set(tmp_dir, dvc):
      assert main(["config", "core.analytics", "false"]) == 0
      assert (
          tmp_dir / ".dvc" / "config"
      ).read_text() == textwrap.dedent(
          """\
          [core]
              no_scm = True
              analytics = false
          """
      )
      assert not (tmp_dir / ".dvc" / "config.local").exists()
  
      assert main(["config", "core.analytics", "true"]) == 0
      assert (
          tmp_dir / ".dvc" / "config"
      ).read_text() == textwrap.dedent(
          """\
          [core]
              no_scm = True
              analytics = true
          """
      )
      assert not (tmp_dir / ".dvc" / "config.local").exists()
  
      assert main(["config", "core.analytics", "--unset"]) == 0
      assert (
          tmp_dir / ".dvc" / "config"
      ).read_text() == textwrap.dedent(
          """\
          [core]
              no_scm = True
          """
      )
      assert not (tmp_dir / ".dvc" / "config.local").exists()
  
imports: import os
  import textwrap
  import pytest
  from dvc.cli import main
  from dvc.config import Config, ConfigError
label_desc: Use image node_id 1 for calling a global function with example usage: test_config_set(tmp_dir, dvc) without return types