code: def guard(params, guardian, error_class=GuardError, message=''):
      '''
      A guard function - check parameters
      with guardian function on decorated function
  
      :param tuple or string params: guarded function parameter/s
      :param function guardian: verifying the conditions for the selected parameter
      :param Exception error_class: raised class when guardian return false
      :param string message: error message
      '''
      params = [params] if isinstance(params, string_types) else params
  
      def guard_decorate(f):
          @wraps(f)
          def _guard_decorate(*args, **kwargs):
              if guardian(**_params(f, args, kwargs, params)):
                  return f(*args, **kwargs)
              else:
                  raise error_class(message)
          return _guard_decorate
      return guard_decoratf guard(params, guardian, error_class=GuardError, message=''):
      '''
      A guard function - check parameters
      with guardian function on decorated function
  
      :param tuple or string params: guarded function parameter/s
      :param function guardian: verifying the conditions for the selected parameter
      :param Exception error_class: raised class when guardian return false
      :param string message: error message
      '''
      params = [params] if isinstance(params, string_types) else params
  
      def guard_decorate(f):
          @wraps(f)
          def _guard_decorate(*args, **kwargs):
              if guardian(**_params(f, args, kwargs, params)):
                  return f(*args, **kwargs)
              else:
                  raise error_class(message)
          return _guard_decorate
      return guard_decorate
docs: A guard function - check parameters
      with guardian function on decorated function
  
      :param tuple or string params: guarded function parameter/s
      :param function guardian: verifying the conditions for the selected parameter
      :param Exception error_class: raised class when guardian return false
      :param string message: error message