code: def _handle_return_inputs_as_outputs_func(f):
      returned_inputs = []
      for v_name, v in f.inputs.items():
          if v not in f.outputs:
              continue
          returned_inputs.append(v)
  
      with f:
          for v in returned_inputs:
              # copy twice since NN layer cannot have input name == output name
              v_tmp = mb.identity(x=v, name=v.name + "_tmp")
              res = mb.identity(x=v_tmp, name=v.name)
              res.op.enclosing_block.replace_uses_of_var_after_op(
                  anchor_op=res.op, old_var=v, new_var=res
              )
  
imports: from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil.passes.graph_pass import AbstractGraphPass
  from coremltools.converters.mil.mil.passes.pass_registry import register_pass
label_desc: Use image node_id 1 for calling a global function with example usage: _handle_return_inputs_as_outputs_func(f) without return types