code: def test_short_circuit_optimization(self):
      @torch.jit.script
      def const_expressions(x):
          # type: (int) -> Tuple[bool, bool]
          return x == 1 and False, x == 1 or True
  
      self.run_pass("constant_propagation", const_expressions.graph)
      FileCheck().check_not("prim::If").check_not("aten::eq").run(
          const_expressions.graph
      )
      self.assertEqual(const_expressions(1), (False, True))
  
      @torch.jit.script
      def redundant_expressions(x):
          # type: (int) -> Tuple[bool, bool]
          return x == 1 and True, x == 1 or False
  
      self.run_pass("peephole", redundant_expressions.graph)
      self.assertEqual(redundant_expressions(1), (True, True))
      self.assertEqual(redundant_expressions(0), (False, False))
      # and True / or False are removed from graph
      FileCheck().check("aten::eq").check_not("prim::If").run(
          redundant_expressions.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 9 for calling the TestPeephole obj's underlying member method code with example usage: obj.test_short_circuit_optimization() and returns: unknown,  unknown, unknown,  unknown