code: def test_dict_comprehension_with_type_annotation(self):
      def fn():
          d: Dict[int, str] = {i: chr(i + 65) for i in range(4)}
          return d
  
      self.checkScript(fn, ())
  
      with self.assertRaisesRegex(RuntimeError, ""):
          with self.assertRaisesRegex(
              AssertionError,
              "Expected Dict "
              "type annotation for dict "
              "comprehension, found "
              "Tuple[int, str]",
          ):
  
              @torch.jit.script
              def fn():
                  d: Tuple[int, str] = {
                      i: chr(i + 65) for i in range(4)
                  }
                  return d
  
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 26 for calling the TestTyping obj's underlying member method code with example usage: obj.test_dict_comprehension_with_type_annotation() and returns: d, d