code: def test_locked(mocker):
      repo = mocker.MagicMock()
      repo._lock_depth = 0
      repo.method = locked(repo.method)
  
      args = ()
      kwargs = {}
      repo.method(repo, args, kwargs)
  
      assert repo.method_calls == [
          mocker.call._reset(),
          mocker.call.method(repo, args, kwargs),
          mocker.call._reset(),
      ]
  
file_path: dvc/tests/unit/repo/test_repo.py
imports: import os
  import shutil
  import pytest
  from dvc.exceptions import OutputDuplicationError
  from dvc.repo import NotDvcRepoError, Repo, locked
  from dvc_data.hashfile.hash_info import HashInfo
label_desc: Use image node_id 5 for calling a global function with example usage: test_locked(mocker) without return types