def get_pos_tags(doc, n):
    """Get POS-tagged tokens in the format of a list of 
    (token, POStag) pairs for all sentences in doc.
    Returns upos (Universal part-of-speech) tag only, not 
    xpos (treebank-specific part of speech)"""

    def getpos(i):
        tokens = []
        for token in doc.sentences[i].words:
            tokens.append((token.text, token.upos))
        return tokens

    return [getpos(i) for i in range(n)]