human
Complete this python program:
def _ctcp_dequote(message):
assistant
#Here is the Python program you requested.

    """[Internal] Dequote a message according to CTCP specifications.
    The function returns a list where each element can be either a
    string (normal message) or a tuple of one or two strings (tagged
    messages).  If a tuple has only one element (ie is a singleton),
    that element is the tag; otherwise the tuple has two elements: the
    tag and the data.
    Arguments:
    message -- The message to be decoded.
    """
    def _low_level_replace(match_obj):
        ch = match_obj.group(1)
        return _low_level_mapping.get(ch, ch)
    if (_LOW_LEVEL_QUOTE in message):
        message = _low_level_regexp.sub(_low_level_replace, message)
    if (_CTCP_DELIMITER not in message):
        return [message]
    else:
        chunks = message.split(_CTCP_DELIMITER)
        messages = []
        i = 0
        while (i < (len(chunks) - 1)):
            if (len(chunks[i]) > 0):
                messages.append(chunks[i])
            if (i < (len(chunks) - 2)):
                messages.append(tuple(chunks[(i + 1)].split('    ', 1)))
            i = (i + 2)
        if ((len(chunks) % 2) == 0):
            messages.append((_CTCP_DELIMITER + chunks[(-1)]))
        return messages