def METHOD_NAME():
    class custom_optimizer:
        def __init__(self, **kwargs):
            self.name = "notsupported"
    optimizer = custom_optimizer()
    assert pyhf.optimizer.name != optimizer.name
    pyhf.set_backend(pyhf.tensorlib, optimizer)
    assert pyhf.optimizer.name == optimizer.name