The method get_data has become too long. Please move the part below (i.e. the computation of the GMVs on the fly) into a helper method.