human
I wrote the below code

    def gl_chat():
        content_type = _find_first_key(msg, all_content_types)
        if long:
            return (content_type, msg['chat']['type'], msg['chat']['id'], msg['date'], msg['message_id'])
        else:
            return (content_type, msg['chat']['type'], msg['chat']['id'])
    def gl_callback_query():
        return (msg['id'], msg['from']['id'], msg['data'])
    def gl_inline_query():
        if long:
            return (msg['id'], msg['from']['id'], msg['query'], msg['offset'])
        else:
            return (msg['id'], msg['from']['id'], msg['query'])
    def gl_chosen_inline_result():
        return (msg['result_id'], msg['from']['id'], msg['query'])
    def gl_shipping_query():
        return (msg['id'], msg['from']['id'], msg['invoice_payload'])
    def gl_pre_checkout_query():
        if long:
            return (msg['id'], msg['from']['id'], msg['invoice_payload'], msg['currency'], msg['total_amount'])
        else:
            return (msg['id'], msg['from']['id'], msg['invoice_payload'])
    try:
        fn = {'chat': gl_chat, 'callback_query': gl_callback_query, 'inline_query': gl_inline_query, 'chosen_inline_result': gl_chosen_inline_result, 'shipping_query': gl_shipping_query, 'pre_checkout_query': gl_pre_checkout_query}[flavor]
    except KeyError:
        raise exception.BadFlavor(flavor)
    return fn()

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

def glance(msg, flavor='chat', long=False):