code: def test_handle_unused_inputs():
      @mb.program(
          input_specs=[
              mb.TensorSpec(shape=(1, 2)),
          ]
      )
      def prog(unused_input):
          return mb.const(val=[3, 2])
  
      prev_prog = copy.deepcopy(prog)
      PASS_REGISTRY["nn_backend::handle_unused_inputs"](prog)
      assert_same_output_names(prev_prog, prog)
  
      id_op = prog.find_ops(op_type="identity", exactly_one=True)[0]
      # Assert that input var is consumed by an identity op.
      assert id_op in prog["main"].inputs["unused_input"].child_ops
  
      assert_model_is_valid(prog, {"unused_input": (1, 2)})
  
file_path: coremltools/coremltools/converters/mil/backend/nn/passes/test_passes.py
imports: import copy
  import itertools
  import numpy
  import pytest
  from coremltools.converters.mil import testing_reqs
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil.passes.pass_registry import PASS_REGISTRY
  from coremltools.converters.mil.testing_utils import apply_pass_and_basic_check, assert_model_is_valid, assert_same_output_names, get_op_types_in_program
label_desc: Use image node_id 3 for calling a global function with example usage: test_handle_unused_inputs() and returns: mb