code: def synchronized(func):
      @functools.wraps(func)
      def wrapper(*args, **kwargs):
          with _module_lock:
              return func(*args, **kwargs)
  
      return wrapper
  
file_path: catboost/contrib/python/scipy/py3/scipy/optimize/cobyla.py
imports: import functools
  from threading import RLock
  import numpy
  from scipy.optimize import _cobyla
  from .optimize import OptimizeResult, _check_unknown_options
label_desc: Use image node_id 1 for calling a global function with example usage: synchronized(func) and returns: wrapper, func