<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def age(self):

 """int, the estimated age of the person.
 
 Note that A DOB object is based on a date-range and the exact date is 
 usually unknown so for age calculation the the middle of the range is 
 assumed to be the real date-of-birth. 
 
 """

        if self.date_range is None:
            return
        dob = self.date_range.middle
        today = datetime.date.today()
        if (today.month, today.day) < (dob.month, dob.day):
            return today.year - dob.year - 1
        else:
            return today.year - dob.year