def METHOD_NAME(alpha: float, beta: float, implementation: str, dtype) -> dace.SDFG:
    sdfg = dace.SDFG(name="CSRMV")
    sdfg.add_array("A_val", shape=(NNZ, ), dtype=dtype, transient=False)
    sdfg.add_array("A_row", shape=(N + 1, ), dtype=dace.int32, transient=False)
    sdfg.add_array("A_col", shape=(NNZ, ), dtype=dace.int32, transient=False)
    sdfg.add_array("C", shape=(N, ), dtype=dtype, transient=False)
    sdfg.add_array("B", shape=(M, ), dtype=dtype, transient=False)
    state = sdfg.add_state("state", is_start_state=True)
    a_row_node = state.add_access("A_row")
    a_col_node = state.add_access("A_col")
    a_val_node = state.add_access("A_val")
    B_node = state.add_access("B")
    C_node = state.add_access("C")
    library_node = CSRMV("csrmv", alpha=alpha, beta=beta)
    library_node.implementation = implementation
    state.add_node(library_node)
    state.add_edge(a_val_node, None, library_node, "_a_vals", dace.Memlet.from_array("A_val", sdfg.arrays["A_val"]))
    state.add_edge(a_row_node, None, library_node, "_a_rows", dace.Memlet.from_array("A_row", sdfg.arrays["A_row"]))
    state.add_edge(a_col_node, None, library_node, "_a_cols", dace.Memlet.from_array("A_col", sdfg.arrays["A_col"]))
    state.add_edge(B_node, None, library_node, "_b", dace.Memlet.from_array("B", sdfg.arrays["B"]))
    state.add_edge(library_node, "_c", C_node, None, dace.Memlet.from_array("C", sdfg.arrays["C"]))
    if beta != 0:
        cin_node = state.add_access("C")
        state.add_edge(cin_node, None, library_node, "_cin", dace.Memlet.from_array("C", sdfg.arrays["C"]))
    sdfg.expand_library_nodes()
    sdfg.validate()
    return sdfg