def _clean_secret_value(value: Optional[str]) -> Optional[str]:
    """Clean token by removing trailing and leading spaces and newlines.

    If token is an empty string, return None.
    """
    if value is None:
        return None
    return value.replace("\r", "").replace("\n", "").strip() or None
Clean token by removing trailing and leading spaces and newlines.

    If token is an empty string, return None.
    
argilla/src/argilla/_api/_token.py