code: def check_prediction_match(self, model, coreml_model):
      # Create a small dataset, and compare the models' predict() output
      rs = np.random.RandomState(1234)
      dataset = tc.util.generate_random_sframe(
          column_codes="r" * 3, num_rows=10
      )
      dataset["session_id"] = 0
      dataset[self.target] = random_labels = [
          rs.randint(
              0,
              self.num_labels - 1,
          )
          for i in range(10)
      ]
  
      if _mac_ver() >= (10, 13):
          w = self.prediction_window
          labels = list(map(str, sorted(model.classes)))
  
          input_features = {}
          for f in self.features:
              input_features[f] = dataset[f].to_numpy()
          first_input_dict = {}
          second_input_dict = {}
          for key, value in input_features.items():
              first_input_dict[key] = value[:w].copy()
              second_input_dict[key] = value[w : 2 * w].copy()
          first_input_dict["stateIn"] = np.zeros((400))
          ret0 = coreml_model.predict(first_input_dict)
  
          second_input_dict["stateIn"] = ret0["stateOut"]
          ret1 = coreml_model.predict(second_input_dict)
  
          pred = model.predict(
              dataset, output_type="probability_vector"
          )
          model_time0_values = pred[0]
          model_time1_values = pred[w]
          model_predictions = np.array(
              [model_time0_values, model_time1_values]
          )
          coreml_time0_values = [
              ret0[self.target + "Probability"][l] for l in labels
          ]
          coreml_time1_values = [
              ret1[self.target + "Probability"][l] for l in labels
          ]
          coreml_predictions = np.array(
              [coreml_time0_values, coreml_time1_values]
          )
  
          np.testing.assert_array_almost_equal(
              model_predictions, coreml_predictions, decimal=3
          )
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import unittest
  import turicreate
  import random
  import tempfile
  import math
  import numpy
  from numbers import Number
  from .None import util
  import pytest
  from turicreate.toolkits._internal_utils import _mac_ver
  from turicreate.toolkits._main import ToolkitError
  import uuid
label_desc: Use image node_id 6 for calling the ActivityClassifierTest obj's underlying member method code with example usage: obj.check_prediction_match(model, coreml_model) without return types