original_docstring: 
      Retrieve and filter messages from queue
      
docstring: Retrieve and filter messages from queue
docstring_tokens: Retrieve and filter messages from queue
code: def dump_messages(queue, msglimit, indent, quiet):
      '''
      Retrieve and filter messages from queue
      '''
      queue = SQSQueue.get(queue)
      messages = queue.get_messages(limit=msglimit)
      results = {'messages': []}
      label = 'Processing messages'
      with click.progressbar(messages, label=label, file=_default_text_stderr()) as msgbar:
          for message in msgbar:
              try:
                  message_data = json.loads(message.body)
                  if message_data.get('Message'):
                      message_data['Message'] = json.loads(message_data['Message'])
  
                  results['messages'].append({
                      'message': message_data,
                      'receipt': message.receipt_handle
                  })
              except json.decoder.JSONDecodeError:
                  click.echo('messages are not json, :-(', err=True)
                  return
  
      if not quiet and results['messages']:
          click.echo(json.dumps(results, indent=indent))
      return results
code_tokens: def dump_messages ( queue , msglimit , indent , quiet ) : queue = SQSQueue . get ( queue ) messages = queue . get_messages ( limit = msglimit ) results = { 'messages' : [ ] } label = 'Processing messages' with click . progressbar ( messages , label = label , file = _default_text_stderr ( ) ) as msgbar : for message in msgbar : try : message_data = json . loads ( message . body ) if message_data . get ( 'Message' ) : message_data [ 'Message' ] = json . loads ( message_data [ 'Message' ] ) results [ 'messages' ] . append ( { 'message' : message_data , 'receipt' : message . receipt_handle } ) except json . decoder . JSONDecodeError : click . echo ( 'messages are not json, :-(' , err = True ) return if not quiet and results [ 'messages' ] : click . echo ( json . dumps ( results , indent = indent ) ) return results
short_docstring: Retrieve and filter messages from queue
short_docstring_tokens: Retrieve and filter messages from queue
comment: '''
      Retrieve and filter messages from queue
      '''