def METHOD_NAME(self, data):
    "Return start and end time objects"
    datetimes = []
    for x in [data[self.START_KEY], data[self.END_KEY]]:
        try:
            datetime_obj = datetime.fromisoformat(x)
        except (ValueError, TypeError):
            return messages.ERROR, "Malformed time found: %s." % x
        datetimes.append(datetime_obj)
    return datetimes