code: def test_dict_in_not_in(self):
      def test_in_dict(x):
          # type: (Dict[str, int]) -> bool
          return "hi" in x
  
      self.checkScript(test_in_dict, ({"hi": 2, "bye": 3},))
      self.checkScript(test_in_dict, ({"bye": 3},))
  
      # Check evaluation order
      @torch.jit.script
      def a():
          print("a")
          return 3
  
      @torch.jit.script
      def b():
          print("b")
          return {3: 2, 4: 1}
  
      @torch.jit.script
      def fn():
          return a() in b()
  
      with self.capture_stdout() as captured:
          self.assertTrue(fn())
      if not IS_WINDOWS:
          # no stdout capturing on windows
          self.assertEqual(captured[0], "a\nb\n")
  
      def test_not_in_dict(a):
          # type: (Dict[str, int]) -> bool
          if "hello" not in a:
              return False
          else:
              return True
  
      self.checkScript(test_not_in_dict, ({"hello": 1, "world": 2},))
      self.checkScript(test_not_in_dict, ({"world": 2},))
  
      def test_dict_tensor_key(a, t):
          # type: (Dict[Tensor, int], Tensor) -> bool
          if t in a:
              return True
          else:
              return False
  
      inp1 = torch.tensor(3)
      inp2 = torch.tensor(5)
      dict_a = {inp1: 1, inp2: 3}
      self.checkScript(test_dict_tensor_key, (dict_a, torch.tensor(4)))
      self.checkScript(test_dict_tensor_key, (dict_a, torch.tensor(3)))
      self.checkScript(test_dict_tensor_key, (dict_a, inp1))
      self.checkScript(test_dict_tensor_key, (dict_a, inp2))
  
imports: import os
  import sys
  import torch
  from torch.testing._internal.jit_utils import JitTestCase, make_global
  from torch.testing._internal.common_utils import IS_WINDOWS
  from collections import namedtuple
  from typing import List, Tuple, Dict, NamedTuple
label_desc: Use image node_id 1 for calling the TestTyping obj's underlying member method code with example usage: obj.test_dict_in_not_in() and returns: unknown, int, dict, unknown, False, True, True, False