code: def _print_network_spec_coding_style(
      mlmodel_spec, interface_only=False
  ):
      """
      Args:
      mlmodel_spec : the mlmodel spec
      interface_only : Shows only the input and output of the network
      """
  
      inputs = [
          (blob.name, _get_feature_description_summary(blob))
          for blob in mlmodel_spec.description.input
      ]
      outputs = [
          (blob.name, _get_feature_description_summary(blob))
          for blob in mlmodel_spec.description.output
      ]
  
      input_names = []
      print("Inputs:")
      for i in inputs:
          name, description = i
          print("  {} {}".format(name, description))
          input_names.append(name)
  
      output_names = []
      print("Outputs:")
      for o in outputs:
          name, description = o
          print("  {} {}".format(name, description))
          output_names.append(name)
  
      if interface_only:
          return
  
      nn_spec = None
  
      if mlmodel_spec.HasField("neuralNetwork"):
          nn_spec = mlmodel_spec.neuralNetwork
      elif mlmodel_spec.HasField("neuralNetworkClassifier"):
          nn_spec = mlmodel_spec.neuralNetworkClassifier
      elif mlmodel_spec.HasField("neuralNetworkRegressor"):
          nn_spec = mlmodel_spec.neuralNetworkRegressor
  
      if nn_spec is None:
          print("\n(This MLModel is not a neural network model)")
          return
  
      print("\n")
      _summarize_neural_network_spec_code_style(
          nn_spec, input_names=input_names, output_names=output_names
      )
  
imports: from .spec_inspection_utils import _get_feature_description_summary, _summarize_neural_network_spec_code_style, _summarize_neural_network_spec
label_desc: Use image node_id 2 for calling a global function with example usage: _print_network_spec_coding_style(mlmodel_spec, interface_only) without return types