import re


def extract_date_from_date_time(date_time: str) -> str:
    """
    Given a date in format YYYY-MM-DDTHH:MM:SS, extract the date
    part (i.e. YYYY-MM-DD)

    :param date_time : str (DATETIME_FORMAT)

    :return str
        a date in DATE_FORMAT
    """
    assert type(date_time) == str, "date_time must be of type str. Got %s" % str(type(date_time))
    match = re.findall("\d{4}-\d{2}-\d{2}", date_time)
    if len(match) == 1:
        return match[0]
    raise ValueError("Invalid date_time input given. Got (%s)" % date_time)