code: def test_map_dict_of_basic(self) -> None:
      self.assertEqual(
          self.mapper.map_with_type({}, Dict[str, int]), {}
      )
      self.assertEqual(
          self.mapper.map_with_type({"foo": 42}, Dict[str, int]),
          {"foo": 42},
      )
      with self.assertRaises(TypeError):
          self.mapper.map_with_type("{}", Dict[str, int])
      with self.assertRaises(TypeError):
          self.mapper.map_with_type({0xF00: 4.2}, Dict[str, int])
      with self.assertRaises(TypeError):
          self.mapper.map_with_type({"foo": "bar"}, Dict[str, int])
  
imports: from enum import Enum
  from typing import ClassVar, Dict, List, Optional, Union
  from unittest import main, TestCase
  import attr
  from torchbiggraph.schema import Dumper, extract_nested_type, inject_nested_value, Loader, Schema, schema, unpack_optional
label_desc: Use image node_id 7 for calling the BaseMapperMixin obj's underlying member method code with example usage: obj.test_map_dict_of_basic() without return types