def sanitize_label(label: str) -> str:
    """
    Sanitize a BIO label - this deals with OIE
    labels sometimes having some noise, as parentheses.
    """
    if "-" in label:
        prefix, suffix = label.split("-")
        suffix = suffix.split("(")[-1]
        return f"{prefix}-{suffix}"
    else:
        return label
def sanitize_label ( label : str ) -> str : if "-" in label : prefix , suffix = label . split ( "-" ) suffix = suffix . split ( "(" ) [ - 1 ] return f"{prefix}-{suffix}" else : return label
Sanitize a BIO label - this deals with OIE
    labels sometimes having some noise, as parentheses.