code: def test_scm_context_when_already_ignored(tmp_dir, scm, dvc):
      scm.ignore(tmp_dir / "foo")
      scm._reset()
  
      with dvc.scm_context() as context:
          context.ignore(tmp_dir / "foo")
          # If files are already ignored, dvc should not try to track a new
          # .gitignore file as it's a no-op.
          assert not context.files_to_track
  
      scm._reset()
      assert scm.is_ignored("foo")
  
label_desc: Use image node_id 3 for calling a global function with example usage: test_scm_context_when_already_ignored(tmp_dir, scm, dvc) without return types