<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_year_description(self):
 """Generates a description for only the YEAR portion of the expression Returns: The YEAR description """


        def format_year(s):
            regex = re.compile(r"^\d+$")
            if regex.match(s):
                year_int = int(s)
                if year_int < 1900:
                    return year_int
                return datetime.date(year_int, 1, 1).strftime("%Y")
            else:
                return s

        return self.get_segment_description(
            self._expression_parts[6],
            '',
            lambda s: format_year(s),
            lambda s: _(", every {0} years").format(s),
            lambda s: _(", {0} through {1}"),
            lambda s: _(", only in {0}")
        )