How do I have Subplots with only one set of legends? Python

for each subplot I have 3 seperate line:2017 ,2018 and 2019 with 3 times “go.Scatter”, each subplot represents one country (25 countries) with always these 3 years. I can use the subplot sample code but then all the 75 legends (25 X 3) will be all together with different colors and it’s messy.

I don’t need different colors amont different subplot, I can just have 3 different colors and 3 legends for the 3 years on all subplots, would be ideal if I click on for example 2017 that all the 2017 curve/line dissappear across the 25 subplots.

Anyone can share a sample code? it can be 2 instead of 25 for illustration purpose. I fail to find this sample code on Plotly website.

how does this forum work please, if nobody replies to our post shall we just give up? or eventually a Plotly admin will answer? Thanks