from datetime import datetime


def parse_date_string(date_string):
    """
    Converts the date strings created by the API (e.g. '2012-04-06T19:11:33.032') and
    returns an equivalent datetime instance.
    """
    return datetime.strptime(date_string, "%Y-%m-%dT%H:%M:%S.%f")