docstr: To create a simple KerasClassifier for testing.
  :return:
docstr_tok: ["To","create","a","simple","KerasClassifier","for","testing",".",":","return",":"]
code: def _create_krclassifier():
      """
      To create a simple KerasClassifier for testing.
      :return:
      """
      import tensorflow as tf
  
      tf_version = [int(v) for v in tf.__version__.split(".")]
      if tf_version[0] == 2 and tf_version[1] >= 3:
          tf.compat.v1.disable_eager_execution()
          from tensorflow import keras
          from tensorflow.keras.models import Sequential
          from tensorflow.keras.layers import (
              Dense,
              Flatten,
              Conv2D,
              MaxPooling2D,
          )
      else:
          import keras
          from keras.models import Sequential
          from keras.layers import Dense, Flatten, Conv2D, MaxPooling2D
  
      # Create simple CNN
      model = Sequential()
      model.add(
          Conv2D(
              4,
              kernel_size=(5, 5),
              activation="relu",
              input_shape=(28, 28, 1),
          )
      )
      model.add(MaxPooling2D(pool_size=(2, 2)))
      model.add(Flatten())
      model.add(Dense(10, activation="softmax"))
  
      model.compile(
          loss=keras.losses.categorical_crossentropy,
          optimizer=keras.optimizers.legacy.Adam(lr=0.01),
          metrics=["accuracy"],
      )
  
      # Get the classifier
      krc = KerasClassifier(
          model=model, clip_values=(0, 1), use_logits=False
      )
  
      return krc
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  import numpy
  import tensorflow
  import torch.nn
  import torch.nn.functional
  import torch.optim
  from art.attacks.evasion.hop_skip_jump import HopSkipJump
  from art.estimators.classification.keras import KerasClassifier
  from art.estimators.classification.pytorch import PyTorchClassifier
  from art.estimators.classification.tensorflow import TensorFlowClassifier
  from art.metrics.metrics import adversarial_accuracy, empirical_robustness, clever_t, clever_u, clever, loss_sensitivity, wasserstein_distance
  from art.utils import load_mnist
  from tests.utils import master_seed
label_desc: Use image node_id 7 for calling the TestMetrics obj's underlying member method code with example usage: obj._create_krclassifier() and returns: krc