How to express the random

Hello everyone
The expression of phi0 is phi0 = -tanh((y-r)/DOLFIN_EPS),
where r = 0.2+0.01*rand(x),
rand(x) is the random number in [-1, 1]。
How should I express phi0 in fenics?