async def _sync_all_conversations(client):
conv_states = []<EOL>sync_timestamp = None<EOL>request = hangouts_pb2.SyncRecentConversationsRequest(<EOL>request_header=client.get_request_header(),<EOL>max_conversations=CONVERSATIONS_PER_REQUEST,<EOL>max_events_per_conversation=<NUM_LIT:1>,<EOL>sync_filter=[<EOL>hangouts_pb2.SYNC_FILTER_INBOX,<EOL>hangouts_pb2.SYNC_FILTER_ARCHIVED,<EOL>]<EOL>)<EOL>for _ in range(MAX_CONVERSATION_PAGES):<EOL><INDENT>logger.info(<EOL>'<STR_LIT>', request.last_event_timestamp<EOL>)<EOL>response = await client.sync_recent_conversations(request)<EOL>conv_states = list(response.conversation_state) + conv_states<EOL>sync_timestamp = parsers.from_timestamp(<EOL>response.response_header.current_server_time<EOL>)<EOL>if response.continuation_end_timestamp == <NUM_LIT:0>:<EOL><INDENT>logger.info('<STR_LIT>')<EOL>break<EOL><DEDENT>else:<EOL><INDENT>request.last_event_timestamp = response.continuation_end_timestamp<EOL><DEDENT><DEDENT>else:<EOL><INDENT>logger.warning('<STR_LIT>')<EOL><DEDENT>logger.info('<STR_LIT>', len(conv_states))<EOL>return conv_states, sync_timestamp<EOL>
Sync all conversations by making paginated requests.

    Conversations are ordered by ascending sort timestamp.

    Args:
        client (Client): Connected client.

    Raises:
        NetworkError: If the requests fail.

    Returns:
        tuple of list of ``ConversationState`` messages and sync timestamp