from datetime import datetime


def unrets_date(rets_date):
    """
    Converts a RETS date (ISO 8601 format) into a Python datetime

    :param rets_date: a RETS/ISO 8601 date
    :type rets_date: str
    :rtype: datetime.datetime
    :return: rets_date as a Python datetime
    """
    # For datetimes with microseconds
    return datetime.strptime(rets_date, '%Y-%m-%dT%H:%M:%S.%f')