from datetime import datetime


def parse_datetime(data, *, default=None):
    """
    Parse data into Python datetime object
    :param data: The data to be parsed
    :param default: Value if data is None or empty
    :return: Python datetime object or default
    """
    if data:
        try:
            return datetime.strptime(data, "%Y-%m-%dT%H:%M:%SZ")
        except ValueError:
            return default
    else:
        return default