def METHOD_NAME():
    class custom_optimizer:
        def __init__(self, **kwargs):
            self.name = "scipy"
    with pytest.raises(AttributeError):
        pyhf.set_backend(pyhf.tensorlib, custom_optimizer())