code: def convert_dense_tf_to_coreml(dense_weights):
      """
      The Dense layer weights from TensorFlow are converted
      back to CoreML specification.
  
      Parameters
      ----------
      dense_weights: 2d numpy array of shape
         [outputChannels, kernelChannels, kernelHeight, kernelWidth]
  
      Returns
      -------
      return: 4d numpy array of shape
         [outputChannels, inChannels, 1, 1]
  
      """
      dense_weights = np.transpose(dense_weights)
      return np.reshape(
          dense_weights,
          (dense_weights.shape[0], dense_weights.shape[1], 1, 1),
      )
  
file_path: turicreate/src/python/turicreate/toolkits/_tf_utils.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import numpy
  from turicreate._deps.minimal_package import _minimal_package_import_check
label_desc: Use image node_id 9 for calling a global function with example usage: convert_dense_tf_to_coreml(dense_weights) and returns: np