:param manager: Context manager to handle transactions
    :param handle_id: Node handle id
    :param other_handle_id: Other node handle id
    :param rel_type: Relationship type
    :param legacy: Backwards compatibility

    :type manager: Neo4jDBSessionManager
    :type handle_id: str|unicode
    :type other_handle_id: str|unicode
    :type rel_type: str|unicode
    :type legacy: Boolean

    :rtype: int|neo4j.v1.types.Relationship

def _create_relationship(manager, handle_id, other_handle_id, rel_type, legacy=True):
    """
    :param manager: Context manager to handle transactions
    :param handle_id: Node handle id
    :param other_handle_id: Other node handle id
    :param rel_type: Relationship type
    :param legacy: Backwards compatibility

    :type manager: Neo4jDBSessionManager
    :type handle_id: str|unicode
    :type other_handle_id: str|unicode
    :type rel_type: str|unicode
    :type legacy: Boolean

    :rtype: int|neo4j.v1.types.Relationship
    """

    q = """
        MATCH (a:Node {handle_id: {start}}),(b:Node {handle_id: {end}})
        CREATE (a)-[r:%s]->(b)
        RETURN r
        """ % rel_type

    with manager.session as s:
        if legacy:
            return s.run(q, {'start': handle_id, 'end': other_handle_id}).single()['r'].id
        return s.run(q, {'start': handle_id, 'end': other_handle_id}).single()['r']