from datetime import datetime


def convert_timestamp_iso6801_to_unix(timestamp_iso6801):
    """Convert timestamp in ISO6801 format to UNIX timestamp.

    Args:
        timestamp_iso6801 (str): Timestamp in ISO6801 format.

    Returns:
        float: UNIX timestamp.
    """
    if '.' in timestamp_iso6801:
        timestamp_datetime = datetime.strptime(timestamp_iso6801,
                                               '%Y-%m-%dT%H:%M:%S.%fZ')
    else:
        timestamp_datetime = datetime.strptime(timestamp_iso6801,
                                               '%Y-%m-%dT%H:%M:%SZ')
    timestamp_unix = (timestamp_datetime -
                      datetime(1970, 1, 1)).total_seconds()
    return timestamp_unix