code: def test_dict_type_refinement_annotation_value_mismatch(self):
      def fn():
          l1 = ["foo", "bar", "baz", "qux"]
          l2 = [1, 2, "foo", 3]
          d: Dict[str, int] = dict(zip(l1, l2))
          return d
  
      with self.assertRaisesRegex(
          RuntimeError,
          "Dict type annotation"
          r" `Dict\[str, int\]` did not match"
          " the type of an actual value type"
          r" `Union\[int, str\]`",
      ):
          torch.jit.script(fn)
  
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 4 for calling the TestTyping obj's underlying member method code with example usage: obj.test_dict_type_refinement_annotation_value_mismatch() and returns: d