code: def handle_unused_inputs(prog):
      """
      prog: Program
  
      # NN doesn't allow unused inputs. Insert an identity op to consume
      # inputs (though its outputs are not used.). This pass must come after
      # dead code elimination as all inserted code are "dead code". Example:
      #
      # Given:
      #
      #    main(%x: (2, 3, fp32)) {
      #      block0() {
      #        %shape_0_const: (2,i32)* = const(val=[4, 7])
      #      } -> (%shape_0_const)
      #    }
      #
      # (Notice that input %x is not consumed. This causes error in NN.)
      #
      # Result:
      #
      #    main(%x: (2, 3, fp32)) {
      #      block0() {
      #        %unused_var: (2, 3, fp32) = identity(x=%x)
      #        %shape_0_const: (2,i32)* = const(val=[4, 7])
      #      } -> (%shape_0_const)
      #    }
      """
      for f_name, f in prog.functions.items():
          handle_unused_inputs_func(f)
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil.passes.pass_registry import register_pass
label_desc: Use image node_id 2 for calling a global function with example usage: handle_unused_inputs(prog) without return types