Jazz Improvisation Tip: While it is sound discipline and ear training learning lines from others through the keys, don't just stop there.
Rhythm is king. You'll get more mileage extracting the pitch collections of phrases and utilizing the rhythmic content to expand your vocabulary.
The shapes could be intervals, chords, scales, chromatic enclosures, etc.
The end goal is self discovery not cloning.
Peace & Keep Swingjng,
Andre Hayward