-loop-extract question

-loop-extract extracts the top-level loop into it’s own function.

My question: Is there a way to extract each loop (nested loops too) into their own functions?