'Keyword argument "default" lets you set a default value if
no node is found.  Note that this means you must use
Equal(F("default"), <value>) to actually check a field called
"default" on a node.'

def get_link(self, query1=None, query2=(), **kw):

    if ('default' in kw):
        has_default = True
        default = kw['default']
        del kw['default']
    else:
        has_default = False
    one = False
    if ('one' in kw):
        one = kw['one']
        del kw['one']
    assert (len(kw) == 0)
    r = self.find_links(query1, query2)
    if ((len(r) > 1) and one):
        raise RuntimeError('More    than    one    match')
    elif (len(r) == 0):
        if has_default:
            return default
        raise RuntimeError('Could    not    get    element')
    return r[0]
