PARTITION FUNCTIONS AS AVERAGES OF FUNCTIONALS OF GAUSSIAN RANDOM FUNCTIONS