code: def _make_model_flatten_axis3():  # type: (...) -> ModelProto
      """
      make a simple model: 4-D input -> flatten (axis=3)-> output
      """
      inputs = [("input", (1, 3, 10, 20), TensorProto.FLOAT)]
      outputs = [("output", (30, 20), TensorProto.FLOAT)]
      flatten = helper.make_node(
          "Flatten",
          inputs=[inputs[0][0]],
          outputs=[outputs[0][0]],
          axis=3,
      )
      return _onnx_create_model([flatten], inputs, outputs)
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/onnx/_tests/test_custom_layers.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import unittest
  from coremltools._deps import _HAS_ONNX, MSG_ONNX_NOT_FOUND
  from coremltools.proto import NeuralNetwork_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: _make_model_flatten_axis3() and returns: _onnx_create_model