Plotly Express: Legend Grouping


Is there a way to define legend groups with plotly express?

import pandas as pd
import numpy as np
import as px

df = pd.DataFrame({'time': np.tile(np.arange(10),2), 'price': np.random.randint(100,200,20), 'group': np.repeat(['a','b'],10)})
df['is_prediction'] = df.time >= 8

px.line(df, x="time", y="price", color="group", line_dash="is_prediction")

Here, I would like the color and line_dash to have separate legends instead of being clubbed together. So the legend should look something like:

[*blue*] a
[*red*] b

Is Prediction
- False
-- True

Thanks in advance.

Unfortunately thereโ€™s not really any way to do this at this time.