How to use secondary_y in Bar

My code is like this

    def draw_gpu_bar(self, primary_data, secondary_data, title):
        fig = make_subplots(specs=[[{"secondary_y": True}]])

        for item in primary_data:
            fig.add_trace(go.Bar(x=self.__x_list, y=item["value"], name=item["name"], textposition="outside"),)

        for item in secondary_data:
            fig.add_trace(go.Bar(x=self.__x_list, y=item["value"], name=item["name"],
                                 textposition="outside"), secondary_y=True)

        fig.update_yaxes(title_text="title1", secondary_y=False)
        fig.update_yaxes(title_text="title2", secondary_y=True)
        fig.update_layout(height=500, hovermode="x unified",  title=f"<b>{title}使用情冡对比</b>", barmode="group")
        return fig

When I use secondary_y, the params barmode=β€œgroup” did not work. How can I slove this problem