def METHOD_NAME(self, state: SDFGState, sdfg: SDFG):
    import dace.libraries.blas as blas
    map_exit = state.exit_node(self.map_entry)
    scope = state.scope_subgraph(self.map_entry)
    einsum = blas.Einsum('einsum')
    connector_product = 1  # Needed to compute alpha (input) coefficient
    # Map connectors from tasklet to library node
    connectors: Dict[str, str] = {}
    in_edges = []
    out_edge = None
    for e in state.in_edges(self.tasklet):
        if not e.data.is_empty():
            connectors[state.memlet_path(e)[-2].dst_conn] = e.dst_conn
            connector_product *= symbolic.symbol(e.dst_conn)
            einsum.add_in_connector(e.dst_conn, self.tasklet.in_connectors[e.dst_conn])
            in_edges.append(e)
    for e in state.out_edges(self.tasklet):
        if not e.data.is_empty():
            connectors[state.memlet_path(e)[1].src_conn] = e.src_conn
            einsum.add_out_connector(e.src_conn, self.tasklet.out_connectors[e.src_conn])
            out_edge = e
    # Compute alpha coefficient from tasklet code
    expr = self.tasklet.code.code[0]
    symexpr = pystr_to_symbolic(astutils.unparse(expr.value))
    einsum.alpha = symexpr / connector_product
    # Collect einsum string from sorted memlets
    param_mapping: Dict[str, str] = {}
    # letter_to_range: Dict[str, subsets.Range] = {}
    einsum_inputs = []
    einsum_output = ''
    for e in (in_edges + [out_edge]):
        # Create parameter mapping
        ind = [str(rb) for rb, _, _ in e.data.subset.ndrange()]
        expr = ''
        for i in ind:
            if i != '0' and i not in param_mapping:
                param_mapping[i] = self.EINSUM_CHARS[len(param_mapping)]
                # pind = self.map_entry.map.params.index(i)
                # letter_to_range[i] = subsets.Range(self.map_entry.map.range[pind])
            expr += '' if i == '0' else param_mapping[i]
        if e is out_edge:
            einsum_output = expr
        else:
            einsum_inputs.append(expr)
    # Make einsum string
    einsum.einsum_str = f"{','.join(einsum_inputs)}->{einsum_output}"
    # Set beta (output) coefficient based on WCR
    if out_edge.data.wcr is not None:
        einsum.beta = 1.0
    # Add new subgraph
    state.add_node(einsum)
    for e in state.in_edges(self.map_entry):
        state.add_edge(e.src, e.src_conn, einsum, connectors[e.dst_conn], e.data)
    for e in state.out_edges(map_exit):
        e.data.wcr = None  # Cancel WCR now that it is nested in the einsum
        state.add_edge(einsum, connectors[e.src_conn], e.dst, e.dst_conn, e.data)
    # Remove old scope
    state.remove_nodes_from(scope.nodes())