<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_allowed_values(self, parameters):
 """ Check whether the given parameter value is allowed. Log messages into ``self.result``. :param dict parameters: the given parameters """

        for key, allowed_values in self.ALLOWED_VALUES:
            self.log([u"Checking allowed values for parameter '%s'", key])
            if key in parameters:
                value = parameters[key]
                if value not in allowed_values:
                    self._failed(u"Parameter '%s' has value '%s' which is not allowed." % (key, value))
                    return
        self.log(u"Passed")