code: def test_keras_2_image_bias(self):
      # define Keras model and get prediction
      input_shape1 = (100, 60, 3)
      input_shape2 = (23, 45, 3)
  
      data1 = Input(shape=input_shape1)
      data2 = Input(shape=input_shape2)
      a_pool = GlobalMaxPooling2D()(data1)
      b_pool = GlobalMaxPooling2D()(data2)
      output = keras.layers.add([a_pool, b_pool])
      model = Model(inputs=[data1, data2], outputs=output)
  
      data1 = np.ones(input_shape1)
      data2 = np.ones(input_shape2)
      keras_input1 = np.ones(input_shape1)
      keras_input2 = np.ones(input_shape2)
  
      data1[:, :, 0] = 100.0
      data1[:, :, 1] = 79.0
      data1[:, :, 2] = 194.0
  
      data2[:, :, 0] = 130.0
      data2[:, :, 1] = 91.0
      data2[:, :, 2] = 11.0
  
      red_bias1 = -88.0
      green_bias1 = -2
      blue_bias1 = -40
  
      red_bias2 = -100.0
      green_bias2 = -29
      blue_bias2 = -15
  
      keras_input1[:, :, 0] = data1[:, :, 2] + blue_bias1
      keras_input1[:, :, 1] = data1[:, :, 1] + green_bias1
      keras_input1[:, :, 2] = data1[:, :, 0] + red_bias1
  
      keras_input2[:, :, 0] = data2[:, :, 0] + red_bias2
      keras_input2[:, :, 1] = data2[:, :, 1] + green_bias2
      keras_input2[:, :, 2] = data2[:, :, 2] + blue_bias2
  
      keras_preds = model.predict(
          [
              np.expand_dims(keras_input1, axis=0),
              np.expand_dims(keras_input2, axis=0),
          ]
      )
      keras_preds = keras_preds.flatten()
  
      # convert to coreml and get predictions
      model_dir = tempfile.mkdtemp()
      model_path = os.path.join(model_dir, "keras.mlmodel")
      from coremltools.converters import keras as keras_converter
  
      coreml_model = keras_converter.convert(
          model,
          input_names=["data1", "data2"],
          output_names=["output"],
          image_input_names=["data1", "data2"],
          red_bias={"data1": red_bias1, "data2": red_bias2},
          green_bias={"data1": green_bias1, "data2": green_bias2},
          blue_bias={"data1": blue_bias1, "data2": blue_bias2},
          is_bgr={"data1": True, "data2": False},
      )
  
      if _is_macos() and _macos_version() >= (10, 13):
          coreml_input_dict = dict()
          coreml_input_dict["data1"] = PIL.Image.fromarray(
              data1.astype(np.uint8)
          )
          coreml_input_dict["data2"] = PIL.Image.fromarray(
              data2.astype(np.uint8)
          )
          coreml_preds = coreml_model.predict(coreml_input_dict)[
              "output"
          ].flatten()
  
          # compare
          self.assertEquals(len(keras_preds), len(coreml_preds))
          max_relative_error = compare_models(keras_preds, coreml_preds)
          self.assertAlmostEquals(
              max(max_relative_error, 0.001), 0.001, delta=1e-6
          )
  
      if os.path.exists(model_dir):
          shutil.rmtree(model_dir)
  
imports: from __future__ import print_function
  import json
  import os
  import shutil
  import subprocess
  import tarfile
  import tempfile
  import unittest
  from subprocess import Popen
  import PIL.Image
  import numpy
  import pytest
  import coremltools
  from coremltools._deps import _HAS_KERAS2_TF
  from coremltools.models.utils import _macos_version, _is_macos
label_desc: Use image node_id 2 for calling the ManyImagesKeras obj's underlying member method code with example usage: obj.test_keras_2_image_bias() without return types