code: def test_peephole_optional_refine(self):
      @torch.jit.script
      def foo(z: int, z2: int, cond: bool):
          if cond:
              return z
          else:
              return z2
  
      out = next(foo.graph.findNode("prim::If").outputs())
      out.setType(torch._C.OptionalType(torch._C.IntType.get()))
      self.run_pass("peephole", foo.graph)
      FileCheck().check_not("int?").run(foo.graph)
  
imports: import torch
  from torch.testing._internal.jit_utils import JitTestCase, RUN_CUDA, _inline_everything
  from torch import nn
  from torch.testing import FileCheck
  from typing import Callable, List
  import unittest
label_desc: Use image node_id 21 for calling the TestPeephole obj's underlying member method code with example usage: obj.test_peephole_optional_refine() and returns: z, z2