def METHOD_NAME(self, type):
    if self.expected_type == None:
        if not is_ur_type(type):
            return False
        self.expected_type = type
        return True
    else:
        return type == self.expected_type