<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _set_max_value(self, max_value):
 """Sets current maximum allowed value"""


        self._external_max_value = max_value

        # Check that the current value of the parameter is still within the boundaries. If not, issue a warning

        if self._external_max_value is not None and self.value > self._external_max_value:

            warnings.warn("The current value of the parameter %s (%s) "
                          "was above the new maximum %s." % (self.name, self.value, self._external_max_value),
                          exceptions.RuntimeWarning)
            self.value = self._external_max_value