Auto generate the headline of the node from the first lines of the description.

def generate_headline_from_description(sender, instance, *args, **kwargs):
    '''
    Auto generate the headline of the node from the first lines of the description.
    '''
    lines = instance.description.split('\n')
    headline = truncatewords(lines[0], 20)
    if headline[:-3] == '...':
        headline = truncatechars(headline.replace(' ...', ''), 250)  # Just in case the words exceed char limit.
    else:
        headline = truncatechars(headline, 250)
    instance.headline = headline