def _scaleRep(reportData):
    """
	Scales reports of different sets of terms.
	Using the percent change with the 1 month overlap should take care of the
	variation in time of a single report. However, if, at the same moment in
	time, a secondary report contains a term which is larger than the constant
	term and so causes the constant to have different values, then the scale is
	off. To fix this, we select a value for the constant term at the same time
	across the new and old reports. factor = old / new, and multiply factor
	across the new report to have the same scale as the old one.
	"""
    baseMonth = reportData[0][0]
    for i in range(1, len(reportData)):
        testMonth = reportData[i][0]
        factor = 0.0
        for j in range(len(baseMonth)):
            old = baseMonth[j][len(baseMonth[j]) - 1]
            new = testMonth[j][len(testMonth[j]) - 1]
            if abs(new - old) > 3:
                old = 1.0 if old == 0.0 else old
                new = 1.0 if new == 0.0 else new
                factor = old / float(new)
                break
        if abs(factor) > 0.0003:
            for j in range(len(reportData[i])):
                for k in range(len(reportData[i][j])):
                    for l in range(1, len(reportData[i][j][k])):
                        reportData[i][j][k][l] = factor * reportData[i][j][k][l
                            ]
    return reportData
