T4611: Add missing `import random`

Authored by machniak on Wed, Jan 30, 3:01 PM.