Generate a coherent tag, given previous tag and current label.

def get_coherent_next_tag(prev_label: str, cur_label: str) -> str:
    """
    Generate a coherent tag, given previous tag and current label.
    """
    if cur_label == "O":
        # Don't need to add prefix to an "O" label
        return "O"

    if prev_label == cur_label:
        return f"I-{cur_label}"
    else:
        return f"B-{cur_label}"