code: def per_callback_query_origin(origins='all'):
      
      def f(msg):
          def origin_type_ok():
              return (origins == 'all'
                  or ('chat' in origins and 'message' in msg)
                  or ('inline' in origins and 'inline_message_id' in msg))
  
          if flavor(msg) == 'callback_query' and origin_type_ok():
              if 'inline_message_id' in msg:
                  return msg['inline_message_id'],
              else:
                  return msg['message']['chat']['id'], msg['message']['message_id']
          else:
              return None
      return f
docs: :param origins:
          ``all`` or a list of origin types (``chat``, ``inline``)
  
      :return:
          a seeder function that returns a callback query's origin identifier if
          that origin type is in ``origins``. The origin identifier is guaranteed
          to be a tuple.