human
I wrote the below code

    def flatten_tokens(tokens):
        l = []
        for token in tokens:
            if isinstance(token, str):
                for char in token:
                    l.append(char)
            else:
                assert isinstance(token, float)
                l.append(token)
        return l
    seq1 = flatten_tokens(tokenize_by_number(str1))
    seq2 = flatten_tokens(tokenize_by_number(str2))
    l = min(len(seq1), len(seq2))
    i = 0
    while (i < l):
        if (isinstance(seq1[i], float) and isinstance(seq2[i], string_types)):
            return (-1)
        elif (isinstance(seq1[i], string_types) and isinstance(seq2[i], float)):
            return 1
        elif (seq1[i] < seq2[i]):
            return (-1)
        elif (seq1[i] > seq2[i]):
            return 1
        i += 1
    if (len(seq1) < len(seq2)):
        return (-1)
    elif (len(seq1) > len(seq2)):
        return 1
    return 0

What's a good function header?
assistant
#Here's a good function header.

def number_aware_alphabetical_cmp(str1, str2):