code: def only_on_master(function):
      
      @wraps(function)
      def inner_function(self, *args, **kwargs):
          """Master checking inner function."""
          if not self.is_coordinator:
              message = 'The method or property "{0}" can only be called/used '\
                  'on the coordinator in a group'.format(function.__name__)
              raise SoCoSlaveException(message)
          return function(self, *args, **kwargs)
      return inner_function
docs: Decorator that raises SoCoSlaveException on master call on slave.