def select_optimizer(method):
    """Use the method name to get optimizer. `method` is a string e.g. `GPMin`"""
    try:
        opt = globals()[method]
    except KeyError:
        opt = None
    return opt