def format_tag_endings(tag, punct_value, endings=[]):
    """Format punctuation around a tag.
    
    Normalizes in case of irregularity. For instance, in the
    cases of both
        words.</> 
        words</>.
    the tags will be normalized to either an in/exclusive order.
    """
    if punct_value == 'inclusive':
        return endings + [tag]
    elif punct_value == 'exclusive':
        return [tag] + endings
    else:
        raise Exception(f'INVALID punct_value supplied: {punct_value}')