code: def synchronised(func):
          
  
          # pylint: disable=E0213
          def Wrapper(main_obj, *args, **kwargs):
              main_obj._lock.acquire()  # pylint: disable=W0212
              try:
                  return func(main_obj, *args, **kwargs)  # pylint: disable=E1102
              finally:
                  main_obj._lock.release()  # pylint: disable=W0212
  
          return Wrapper
docs: Synchronisation decorator.