code: def compare_binary_op(
      self, kk_func, z_layer, shape, rtol=1e-5, atol=1e-5
  ):
      x = klayers.Input(shape=shape[0][1:])
      y = klayers.Input(shape=shape[1][1:])
  
      batch = shape[0][0]
  
      kkresult = kk_func(x, y)
      x_value = np.random.uniform(0, 1, shape[0])
      y_value = np.random.uniform(0, 1, shape[1])
  
      k_grads = KK.get_session().run(
          KK.gradients(kkresult, [x, y]),
          feed_dict={x: x_value, y: y_value},
      )
      k_output = KK.get_session().run(
          kkresult, feed_dict={x: x_value, y: y_value}
      )
      inputs = [Input(s) for s in remove_batch(shape)]
      model = Model(inputs, z_layer(inputs))
      z_output = model.forward([x_value, y_value])
      grad_output = np.array(z_output)
      grad_output.fill(1.0)
      z_grads = model.backward([x_value, y_value], grad_output)
  
      # Check if the model can be forward/backward multiple times or not
      z_output2 = model.forward([x_value, y_value])
      z_grads2 = model.backward([x_value, y_value], grad_output)
      self.assert_allclose(z_output, z_output2, rtol, atol)
      [
          self.assert_allclose(z, k, rtol, atol)
          for (z, k) in zip(z_grads, z_grads2)
      ]
  
      self.assert_allclose(z_output, k_output, rtol, atol)
      [
          self.assert_allclose(z, k, rtol, atol)
          for (z, k) in zip(z_grads, k_grads)
      ]
  
imports: import keras.backend
  import keras.layers
  import numpy
  import pytest
  from test.zoo.pipeline.utils.test_utils import ZooTestCase
  from zoo.pipeline.api.autograd import *
  import zoo.pipeline.api.autograd
  from zoo.pipeline.api.keras.layers import *
  from zoo.pipeline.api.keras.models import Sequential, Model
  from zoo.pipeline.api.utils import remove_batch
label_desc: Use image node_id 1 for calling the TestOperator obj's underlying member method code with example usage: obj.compare_binary_op(kk_func, z_layer, shape, rtol, atol) without return types