def METHOD_NAME(func):
    """Locking for synchronization.
    Args:
        func (function): decorative function
    """
    def wrapper(self, *args, **kwargs):
        with self.lock:
            return func(self, *args, **kwargs)
    return wrapper