    def _make_test_graph_multi_dsts_2(
        self,
        input_shapes,
        input_start_indices,
        input_end_indices,
        dim,
        dtype,
    ):
        """Make a graph where (1) a tensor is sliced twice and both slices are
        fed into the same concat op, and (2) another sliced output (i.e not
        the one from (1)) is fed into the same concat op twice.
        """

        Ys = self._make_slice_ops(
            input_shapes,
            input_start_indices,
            input_end_indices,
            dim,
            dtype,
        )
        slice_op_0 = list(Ys[0].src_ops())[0]
        X0 = slice_op_0._attrs["inputs"][0]
        # make one more slice op that takes the tensor input of the first slice op
        slice_op = ops.dynamic_slice()
        Y0 = slice_op(
            X0, start_indices=input_start_indices[0], end_indices=input_end_indices[0]
        )
        Ys.append(Y0)

        # The last sliced output is fed into concat twice
        Y_1 = Ys[-1]
        Ys.append(Y_1)

        concat_op = ops.concatenate()
        Y = concat_op(Ys, dim)
        Y._attrs["name"] = "output_0"
        Y._attrs["is_output"] = True

        return Y
Make a graph where (1) a tensor is sliced twice and both slices are
fed into the same concat op, and (2) another sliced output (i.e not
the one from (1)) is fed into the same concat op twice.
tests/unittest/compiler/test_slice_scatter_pattern.py