def METHOD_NAME(ner, mention):
    inside = (ner["start_pos"] >= mention["start"] - 1) and (ner["end_pos"] <= mention["end"] + 1)
    offset = abs(ner["start_pos"] - mention["start"]) + abs(ner["end_pos"] - mention["end"])
    return inside, offset