def _atomise_link(link, rel=None):
    """Return a link in a suitable format for atom"""
    if type(link) is dict:
        if 'type' not in link:
            link['type'] = 'text/html'
        if rel and 'rel' not in link:
            link['rel'] = rel
        return link
    else:
        result = {'href': link, 'type': 'text/html'}
        if rel:
            result['rel'] = rel
        return result
