<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _in_valid_interval(self, parameter, value):
 """Returns if the parameter is within its valid interval. :param string parameter: Name of the parameter that has to be checked. :param numeric value: Value of the parameter. :return: Returns :py:const:`True` it the value for the given parameter is valid, :py:const:`False` otherwise. :rtype: boolean """

        # return True, if not interval is defined for the parameter
        if parameter not in self._parameterIntervals:
            return True

        interval = self._parameterIntervals[parameter]

        if interval[2] and interval[3]:
            return interval[0] <= value <= interval[1]

        if not interval[2] and interval[3]:
            return interval[0] <  value <= interval[1]

        if interval[2] and not interval[3]:
            return interval[0] <= value <  interval[1]

        #if False == interval[2] and False == interval[3]:
        return interval[0] < value < interval[1]