'Function to provide the age group for an age'

def get_pr_age_group(self, age):

    fn = self.pr.get('age_group')
    if fn:
        group = fn(age)
    elif (age < 18):
        group = '-17'
    elif (age < 25):
        group = '18-24'
    elif (age < 40):
        group = '25-39'
    elif (age < 60):
        group = '40-59'
    else:
        group = '60+'
    return group
