def METHOD_NAME():
    sdfg = dace.SDFG('deepcopy_nested_sdfg')
    state = sdfg.add_state('state')
    nsdfg = dace.SDFG('nested')
    nsdfg_node = state.add_nested_sdfg(nsdfg, None, {}, {})
    copy_nsdfg = copy.deepcopy(nsdfg_node)
    assert copy_nsdfg.sdfg.parent_nsdfg_node is copy_nsdfg
    assert copy_nsdfg.sdfg.parent is None
    assert copy_nsdfg.sdfg.parent_sdfg is None
    state.add_edge(nsdfg_node, None, copy_nsdfg, None, dace.Memlet())
    assert copy_nsdfg.sdfg.parent is state
    assert copy_nsdfg.sdfg.parent_sdfg is sdfg