<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_historical_data(self, uuid, start, end, average_by=0):
 """ Get the data from one device for a specified time range. .. note:: Can fetch a maximum of 42 days of data. To speed up query processing, you can use a combination of average factor multiple of 1H in seconds (e.g. 3600), and o'clock start and end times :param uuid: Id of the device :type uuid: str :param start: start of the range :type start: datetime :param end: end of the range :type end: datetime :param average_by: amount of seconds to average data over. 0 or 300 for no average. Use 3600 (average hourly) or a multiple for long range requests (e.g. more than 1 day) :type average_by: integer :returns: list of datapoints :raises: ClientError, AuthFailure, BadFormat, ForbiddenAccess, TooManyRequests, InternalError .. seealso:: :func:`parse_data` for return data syntax """

        return self.parse_data((yield from self._get(
            HISTORICAL_DATA_URL.format(uuid= uuid,
                start = trunc(start.replace(tzinfo=timezone.utc).timestamp()),
                end = trunc(end.replace(tzinfo=timezone.utc).timestamp()),
                average_by= trunc(average_by)))))