code: def test_case(self):
      from turicreate.toolkits.sound_classifier import vggish_input
      import coremltools
      from coremltools.proto import FeatureTypes_pb2
  
      model = coremltools.proto.Model_pb2.Model()
      model.customModel.className = "TCSoundClassifierPreprocessing"
      model.specificationVersion = 3
  
      # Input - float array with shape (frame_length)
      x = model.description.input.add()
      x.name = "x"
      x.type.multiArrayType.dataType = (
          FeatureTypes_pb2.ArrayFeatureType.ArrayDataType.Value(
              "FLOAT32"
          )
      )
      x.type.multiArrayType.shape.append(self.frame_length)
  
      # Output - double array with shape (1, 96, 64)
      y = model.description.output.add()
      y.name = "y"
      y.type.multiArrayType.dataType = (
          FeatureTypes_pb2.ArrayFeatureType.ArrayDataType.Value(
              "DOUBLE"
          )
      )
      y.type.multiArrayType.shape.append(1)
      y.type.multiArrayType.shape.append(96)
      y.type.multiArrayType.shape.append(64)
  
      with TempDirectory() as temp_dir:
          model = coremltools.models.MLModel(model)
          model_path = temp_dir + "/test.mlmodel"
          model.save(model_path)
          model = coremltools.models.MLModel(model_path)
  
      input_data = np.arange(self.frame_length) * 0.00001
      y1 = vggish_input.waveform_to_examples(
          input_data, self.sample_rate
      )[0]
      y2 = model.predict({"x": np.float32(input_data)})["y"]
  
      self.assertEqual(y2.shape, (1, 96, 64))
      self.assertTrue(np.isclose(y1, y2, atol=1e-04).all())
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from .util import TempDirectory
  from copy import copy
  import math
  from os import mkdir
  import unittest
  import pytest
  import numpy
  import sys
  import turicreate
  from turicreate.toolkits._internal_utils import _raise_error_if_not_sarray
  from turicreate.toolkits._main import ToolkitError
  from turicreate.toolkits._internal_utils import _mac_ver
label_desc: Use image node_id 1 for calling the CoreMlCustomModelPreprocessingTest obj's underlying member method code with example usage: obj.test_case() without return types