<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_exclude_rec(self):
 # pylint: disable=access-member-before-definition """ Check if this timeperiod is tagged :return: if tagged return false, if not true :rtype: bool """

        if self.rec_tag:
            msg = "[timeentry::%s] is in a loop in exclude parameter" % (self.get_name())
            self.add_error(msg)
            return False
        self.rec_tag = True
        for timeperiod in self.exclude:
            timeperiod.check_exclude_rec()
        return True