def link_ids(id1, id2):
    """
    Takes two id arguments.
    Returns XML for id1 or links id1 and id2 together
    """
    if id1 and id2: # Both exist, so link them
        return '<link>' +  id1 + id2 + '</link>'
    else:
        return id1