The command versor-languide-convert-selection-to-function takes the selection, defines a new function just before the one containing the selection, and replaces the original selection with a call to the new function. It examines the selection and the surrounding code, to find any variables referred to in the selection but defined outside it, and makes those into arguments to the new function.
A call to this function, with the appropriate argument list syntax, is left on the kill-ring, ready for you to insert another call to the new function, as the likely use of this command is to re-use a code block (occurring in-line once) as a function to be called from more than one place.
In the normal Versor key bindings, this command is bound to C-insert f.