code: def tmp_global_dir(mocker, tmp_path):
      """
      Fixture to prevent modifying the actual global config
      """
  
      def _user_config_dir(appname, *_args, **_kwargs):
          return str(tmp_path / appname)
  
      mocker.patch(
          "iterative_telemetry.user_config_dir", _user_config_dir
      )
  
file_path: dvc/tests/unit/test_analytics.py
imports: import json
  import platform
  import pytest
  from voluptuous import Any, Schema
  from dvc import analytics
  from dvc.cli import parse_args
label_desc: Use image node_id 1 for calling a global function with example usage: tmp_global_dir(mocker, tmp_path) and returns: str