

def encode_table(pieces, table):
    'Encode a dict as an AMQP table appending the encded table to the\n    pieces list passed in.\n\n    :param list pieces: Already encoded frame pieces\n    :param dict table: The dict to encode\n    :rtype: int\n\n    '
    table = (table or {
        
    })
    length_index = len(pieces)
    pieces.append(None)
    tablesize = 0
    for (key, value) in table.items():
        tablesize += encode_short_string(table, key)
        tablesize += encode_value(pieces, value)
    pieces[length_index] = struct.pack('>I', tablesize)
    return (tablesize + 4)

dataset/ETHPy150Open pika/pika/pika/data.py encode_table/VarMisuse@62/164 `pieces`->`table`