<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(self, check, radl):
 """ Check type, operator and unit in a feature. Args: - check(tuple):
 - v[0]: expected type of the feature value. - v[1]: can be a list of possible values or a function to test the value or None. - v[2] (optional):
 can be a list of possible units; if None or not set the unit valid is none. - radl: second argument passed when calling v[1]. """


        # Check type
        # If the value must be float, int is also valid
        if check[0] == float:
            if not isinstance(self.value, int) and not isinstance(self.value, float):
                raise RADLParseException("Invalid type; expected %s" % check[0],
                                         line=self.line)
        elif check[0] == str:
            if not isinstance(self.value, str) and not isinstance(self.value, unicode):
                raise RADLParseException("Invalid type; expected %s" % check[0],
                                         line=self.line)
        else:
            if not isinstance(self.value, check[0]):
                raise RADLParseException("Invalid type; expected %s" % check[0],
                                         line=self.line)
        # Check operator
        if (isinstance(self.value, str) or isinstance(self.value, unicode)) and self.prop.find('version') == -1:
            if self.operator != "=":
                raise RADLParseException("Invalid operator; expected '='",
                                         line=self.line)
        elif isinstance(self.value, int) or isinstance(self.value, float) or self.prop.find('version') >= 0:
            if self.operator not in ["=", "<=", ">=", ">", "<"]:
                raise RADLParseException("Invalid operator; expected '=', '<=', " +
                                         "'>=', '>' or '<'", line=self.line)
        elif isinstance(self.value, Features):
            if self.operator != "contains":
                raise RADLParseException(
                    "Invalid operator; expected 'contains'", line=self.line)
        # Check value
        if isinstance(check[1], list):
            if self.value.upper() not in check[1]:
                raise RADLParseException("Invalid value; expected one of %s" % check[1],
                                         line=self.line)
        elif callable(check[1]):
            if not check[1](self, radl):
                raise RADLParseException("Invalid value in property '%s'" % self.prop, line=self.line)
        # Check unit
        if len(check) < 3 or check[2] is None:
            if self.unit:
                raise RADLParseException("Invalid unit; expected none", line=self.line)
        elif len(check) > 2 and check[2]:
            if self.unit.upper() not in check[2]:
                raise RADLParseException(
                    "Invalid unit; expected one of %s" % check[2], line=self.line)
        return True