code: def test_scm_context_decorator(scm_context, mocker):
      from dvc.repo.scm_context import scm_context as decorator
  
      repo = mocker.MagicMock(scm_context=scm_context)
  
      def test_method(repo, *args, **kwargs):
          scm_context.track_file("foo")
  
      method = mocker.MagicMock(wraps=test_method)
      decorator(method, autostage=True)(repo, "arg", kw=1)
      method.assert_called_once_with(repo, "arg", kw=1)
      scm_context.scm.add.assert_called_once_with({"foo"})
  
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 13 for calling a global function with example usage: test_scm_context_decorator(scm_context, mocker) without return types