code: def get_op_types_in_program(
      prog, func_name="main", skip_const_ops=True
  ):
      """
      Return the operation types in prog[func_name],
      in the same order as they are stored (topological)
      """
      op_types_in_program = []
      for op in prog[func_name].operations:
          if skip_const_ops:
              if op.op_type == "const":
                  continue
          op_types_in_program.append(op.op_type)
      return op_types_in_program
  
imports: import logging
  import numpy
  import copy
  import coremltools
  from coremltools import converters
  from coremltools.converters.mil import converter
  from coremltools.converters.mil.mil import Program, Function
  from coremltools.converters.mil.mil.passes.pass_registry import PASS_REGISTRY
  from coremltools._deps import _IS_MACOS
label_desc: Use image node_id 5 for calling a global function with example usage: get_op_types_in_program(prog, func_name, skip_const_ops) and returns: op_types_in_program