def METHOD_NAME(init_swc_text):
    text = init_swc_text
    neuron = ngauge.Neuron.from_swc_text(text)
    assert len(neuron.branches) == 2
    check_single_child(neuron.branches)
    neuron = replace_root(neuron)
    # check single root, and each node except for root has at most one child
    assert len(neuron.branches) == 1
    root = neuron.branches[0]
    assert len(root.children) == 2
    check_single_child(root.children)
    # new root is in right location
    assert np.isclose(root.x, 0)
    assert np.isclose(root.y, 0)
    assert np.isclose(root.z, 0)
    # new root has correct children
    assert len(root.children) == 2
    a_child = root.children[1]
    assert np.isclose(np.linalg.norm([a_child.x, a_child.y, a_child.z]), 5)
    # new root's children has correct parent
    for child in root.children:
        assert child.parent == root