code: def test_scm_context_reset_on_exit(scm_context):
      with scm_context:
          scm_context.ignore("foo")
          scm_context.track_file("bar")
      assert not scm_context.files_to_track
      assert not scm_context.ignored_paths
  
file_path: dvc/tests/unit/repo/test_scm_context.py
imports: import re
  import pytest
  from dvc.repo.scm_context import SCMContext
  from dvc.scm import Git, NoSCM
label_desc: Use image node_id 7 for calling a global function with example usage: test_scm_context_reset_on_exit(scm_context) without return types