Re #10823. Adding original version of the script.
Merge remote-tracking branch 'origin/feature/10823_basis_311'