code: def compare_newapi(
      self,
      klayer,
      blayer,
      input_data,
      weight_converter=None,
      is_training=False,
      rtol=1e-6,
      atol=1e-6,
  ):
      from keras.models import Sequential as KSequential
      from bigdl.dllib.nn.keras.layers.topology import (
          Sequential as BSequential,
      )
  
      bmodel = BSequential()
      bmodel.add(blayer)
      kmodel = KSequential()
      kmodel.add(klayer)
      koutput = kmodel.predict(input_data)
      from bigdl.dllib.nn.keras.layers.layer import BatchNormalization
  
      if isinstance(blayer, BatchNormalization):
          k_running_mean = K.eval(klayer.running_mean)
          k_running_std = K.eval(klayer.running_std)
          blayer.set_running_mean(k_running_mean)
          blayer.set_running_std(k_running_std)
      if kmodel.get_weights():
          bmodel.set_weights(
              weight_converter(klayer, kmodel.get_weights())
          )
      bmodel.training(is_training)
      boutput = bmodel.forward(input_data)
      self.assert_allclose(boutput, koutput, rtol=rtol, atol=atol)
  
imports: from __future__ import print_function
  import numpy
  from keras.models import Sequential, Model
  from keras.layers.core import *
  from keras.layers.convolutional import *
  from keras.layers import Dense, Dropout, Input
  from keras.optimizers import RMSprop
  from bigdl.dllib.utils.common import *
  from bigdl.dllib.keras.converter import *
  from bigdl.dllib.keras.converter import WeightLoader, WeightsConverter
  import numpy
  from unittest import TestCase
  import keras
  from bigdl.dllib.nn.keras.keras_utils import *
label_desc: Use image node_id 15 for calling the BigDLTestCase obj's underlying member method code with example usage: obj.compare_newapi(klayer, blayer, input_data, weight_converter, is_training, rtol, atol) without return types