def qualify_symbol(symname, ns):
    """Build a fully-qualified symbol name from a name & part of namespace."""

    if ns[0] == '.':
        ns = 'py2neo' + ns

    if ns[-1] == '.':
        ns += symname

    return tuple(ns.rsplit('.', 1))