def _parse_queue_message_from_headers(response):
    '''
    Extracts pop receipt and time next visible from headers.
    '''
    headers = _parse_response_for_dict(response)

    message = QueueMessage()
    message.pop_receipt = headers.get('x-ms-popreceipt')
    message.time_next_visible = parser.parse(headers.get('x-ms-time-next-visible'))
    
    return message
Extracts pop receipt and time next visible from headers.