def METHOD_NAME(framework):
    def _get_classifier():
        if framework in ("keras", "kerastf"):
            import tensorflow as tf
            from tensorflow.keras import layers, Sequential
            if tf.__version__[0] == "2":
                tf.compat.v1.disable_eager_execution()
            model = Sequential()
            model.add(layers.Conv2D(4, kernel_size=(5, 5), activation="relu", input_shape=(28, 28, 1)))
            model.add(layers.MaxPooling2D(pool_size=(2, 2)))
            model.add(layers.Flatten())
            model.add(layers.Dense(2, activation="softmax"))
            model.compile(loss="categorical_crossentropy", optimizer="adam", metrics=["accuracy"])
            classifier = KerasClassifier(model=model, clip_values=(0, 1), use_logits=False)
        elif framework == "tensorflow2":
            import tensorflow as tf
            from tensorflow.keras import layers, Sequential
            model = Sequential()
            model.add(layers.Conv2D(4, kernel_size=(5, 5), activation="relu", input_shape=(28, 28, 1)))
            model.add(layers.MaxPooling2D(pool_size=(2, 2)))
            model.add(layers.Flatten())
            model.add(layers.Dense(2, activation="softmax"))
            loss_object = tf.keras.losses.CategoricalCrossentropy(from_logits=False)
            optimizer = tf.keras.optimizers.Adam(learning_rate=0.01)
            classifier = TensorFlowV2Classifier(
                model,
                nb_classes=2,
                input_shape=(28, 28, 1),
                loss_object=loss_object,
                optimizer=optimizer,
            )
        elif framework == "pytorch":
            import torch
            model = torch.nn.Sequential(
                torch.nn.Conv2d(in_channels=1, out_channels=4, kernel_size=5),
                torch.nn.MaxPool2d(2, 2),
                torch.nn.Flatten(),
                torch.nn.Linear(576, 2),
            )
            criterion = torch.nn.CrossEntropyLoss()
            optimizer = torch.optim.Adam(model.parameters(), lr=0.01)
            classifier = PyTorchClassifier(
                model,
                loss=criterion,
                optimizer=optimizer,
                input_shape=(1, 28, 28),
                nb_classes=2,
            )
        else:
            classifier = None
        return classifier
    return _get_classifier