def METHOD_NAME(implementation, dtype, storage=dace.StorageType.Default):
    n = dace.symbol("n")
    suffix = "_device" if storage != dace.StorageType.Default else ""
    transient = storage != dace.StorageType.Default
    sdfg = dace.SDFG("dot_product_{}_{}".format(implementation, dtype))
    state = sdfg.add_state("dataflow")
    sdfg.add_array("x" + suffix, [n], dtype, storage=storage, transient=transient)
    sdfg.add_array("y" + suffix, [n], dtype, storage=storage, transient=transient)
    sdfg.add_array("result" + suffix, [1], dtype, storage=storage, transient=transient)
    x = state.add_read("x" + suffix)
    y = state.add_read("y" + suffix)
    result = state.add_write("result" + suffix)
    dot_node = blas.nodes.dot.Dot("dot")
    dot_node.implementation = implementation
    state.add_memlet_path(x, dot_node, dst_conn="_x", memlet=Memlet.simple(x, "0:n", num_accesses=n))
    state.add_memlet_path(y, dot_node, dst_conn="_y", memlet=Memlet.simple(y, "0:n", num_accesses=n))
    state.add_memlet_path(dot_node, result, src_conn="_result", memlet=Memlet.simple(result, "0", num_accesses=1))
    if storage != dace.StorageType.Default:
        sdfg.add_array("x", [n], dtype)
        sdfg.add_array("y", [n], dtype)
        sdfg.add_array("result", [1], dtype)
        init_state = sdfg.add_state("copy_to_device")
        sdfg.add_edge(init_state, state, dace.InterstateEdge())
        x_host = init_state.add_read("x")
        y_host = init_state.add_read("y")
        x_device = init_state.add_write("x" + suffix)
        y_device = init_state.add_write("y" + suffix)
        init_state.add_memlet_path(x_host, x_device, memlet=Memlet.simple(x_host, "0:n", num_accesses=n))
        init_state.add_memlet_path(y_host, y_device, memlet=Memlet.simple(y_host, "0:n", num_accesses=n))
        finalize_state = sdfg.add_state("copy_to_host")
        sdfg.add_edge(state, finalize_state, dace.InterstateEdge())
        result_device = finalize_state.add_write("result" + suffix)
        result_host = finalize_state.add_read("result")
        finalize_state.add_memlet_path(result_device,
                                       result_host,
                                       memlet=Memlet.simple(result_device, "0", num_accesses=1))
    return sdfg