def find_ner_indices(sents, ner_model):
    """
    Run NER model over a document and return list of list of tuples corresponding to entity index ranges for each sent.
    """
    sents = "\n".join(sents)
    doc = ner_model(sents)
    entity_indices = []
    for sent in doc.sentences:
        sent_entity_indices = []
        ent_begin_idx = -1
        for i, token in enumerate(sent.tokens):
            # Ignore S and O tokens, since they will not be modified.
            if token.ner[0] == "B":
                ent_begin_idx = i
            elif token.ner[0] == "E":
                sent_entity_indices.append((ent_begin_idx, i))
        entity_indices.append(sent_entity_indices)
    return entity_indices