code: def locked(f):
      @wraps(f)
      def wrapper(repo, *args, **kwargs):
          with lock_repo(repo):
              return f(repo, *args, **kwargs)
  
      return wrapper
  
imports: import os
  from collections import defaultdict
  from contextlib import contextmanager
  from functools import wraps
  from typing import TYPE_CHECKING, Callable, ContextManager, Iterable, Optional, Tuple, Union
  from dvc.exceptions import DvcException, NotDvcRepoError, OutputNotFoundError, RevCollectionError
  from dvc.ignore import DvcIgnoreFilter
  from dvc.log import logger
  from dvc.utils.objects import cached_property
label_desc: Use image node_id 2 for calling a global function with example usage: locked(f) and returns: wrapper, f