I am coaching my son's lego league team. If you're curious, here's a link:
In programming these little robots, we use the Lego Robotics Invention System. Basically, the kids learn to program by connecting blocks on the screen (like, "Forward 10 seconds").
You can create custom blocks called "My Blocks." Each block is a "basket" of little commands,
....like a subroutine
One of my students is tackling Bozza's New Orleans, a jazz-influenced chromatic French piece. He sometimes gets hung up on some of the chromatic passages. In the last lesson, we tried the strategy of quickly memorizing chunks of music and working them up without looking at the page.
When I play complicated, chromatic passages, I look at the passage but then essentially play the pattern that I have memorized. I glance at the passage and, hopefully, it evokes my memory of the lick. Instead of focusing on individual notes, I try to automatically play the whole chunk,
...like a subroutine.
Treat complicated licks like those Lego "My Blocks" As you play the piece, hopefully the sight of the lick will trigger a mental subroutine which can be played automatically.