code: def receive_message(self, queue, number_messages=1,
                          visibility_timeout=None, attributes=None, callback=None):
          
          params = {'MaxNumberOfMessages' : number_messages}
          if visibility_timeout:
              params['VisibilityTimeout'] = visibility_timeout
          if attributes:
              self.build_list_params(params, attributes, 'AttributeName')
          return self.get_list('ReceiveMessage', params,
                               [('Message', queue.message_class)],
                               queue.id, queue, callback=callback)
docs: Read messages from an SQS Queue.
  
          :type queue: A Queue object
          :param queue: The Queue from which messages are read.
          
          :type number_messages: int
          :param number_messages: The maximum number of messages to read
                                  (default=1)
          
          :type visibility_timeout: int
          :param visibility_timeout: The number of seconds the message should
                                     remain invisible to other queue readers
                                     (default=None which uses the Queues default)
  
          :type attributes: str
          :param attributes: The name of additional attribute to return
                             with response or All if you want all attributes.
                             The default is to return no additional attributes.
                             Valid values:
                             
                             All|SenderId|SentTimestamp|
                             ApproximateReceiveCount|
                             ApproximateFirstReceiveTimestamp
          
          :rtype: list
          :return: A list of :class:`boto.sqs.message.Message` objects.