def test_docstring_with_python_OO():
    """Check that we don't raise a warning if the code is executed with -OO.

    Non-regression test for:
    https://github.com/scikit-learn-contrib/imbalanced-learn/issues/945
    """
    instance = cls(param_1="xxx", param_2="yyy")
    instance.__doc__ = None  # simulate -OO

    instance = Substitution(param_1="xxx", param_2="yyy")(instance)

    assert instance.__doc__ is None
Check that we don't raise a warning if the code is executed with -OO.

    Non-regression test for:
    https://github.com/scikit-learn-contrib/imbalanced-learn/issues/945
    
imblearn/utils/tests/test_docstring.py