def set_attributes(self, attributes):
self.attributes = attributes<EOL>for attribute, value in attributes.items():<EOL><INDENT>self.__setattr__(attribute, value)<EOL>if DATE_PATTERN.match(text_type(value)):<EOL><INDENT>naive = datetime.strptime(value, '<STR_LIT>')<EOL>aware = naive.replace(tzinfo=pytz.utc)<EOL>self.__setattr__(attribute + '<STR_LIT>', aware)<EOL><DEDENT><DEDENT>
Load this object with attributes.

This method attempts to detect special types based on the field's content
and will create an additional attribute of that type.

Consider a JSON response with the following fields::

    {
        "name": "New course name",
        "course_code": "COURSE-001",
        "start_at": "2012-05-05T00:00:00Z",
        "end_at": "2012-08-05T23:59:59Z",
        "sis_course_id": "12345"
    }

The `start_at` and `end_at` fields match a date in ISO8601 format,
so two additional datetime attributes are created, `start_at_date`
and `end_at_date`.

:param attributes: The JSON object to build this object with.
:type attributes: dict