code: def test_input_returned(self):
      def f(a, b, c):
          a = a.sin()
          c = c.cos()
          d = a * c
          return (a, b, c, d)
  
      inps = [torch.randn(3) for _ in range(3)]
  
      def inputs_returned(fx_g, inps):
          inps = set(get_placeholders(fx_g.graph))
          outs = set(get_outputs(fx_g.graph))
          return len(inps & outs) > 0
  
      failing_f = make_fx(f)(*inps)
      min_f, inps = minifier(failing_f, inps, inputs_returned)
      self.assertEqual(len(min_f.graph.nodes), 2)
      self.assertEqual(len(inps), 1)
  
file_path: pytorch/test/functorch/test_minifier.py
imports: import torch
  from functorch.compile import minifier
  from torch._functorch.compile_utils import get_placeholders, get_outputs
  from functorch import make_fx
  from torch.testing._internal.common_utils import TestCase, run_tests
label_desc: Use image node_id 3 for calling the TestMinifier obj's underlying member method code with example usage: obj.test_input_returned() and returns: a,  b,  c,  d, unknown