code: def map_schema(self, data: Any, type_: Type["Schema"]) -> "Schema":
      if not isinstance(data, dict):
          raise DeepTypeError("Not a schema")
      fields = attr.fields_dict(type_)
      kwargs = {}
      for key, value in data.items():
          # Convert legacy mixedCase to lower_case.
          key = mixed_case_to_lowercase(key)
          try:
              field = fields[key]
          except LookupError:
              raise DeepTypeError("Unknown key: %s" % key) from None
          if field.type is None:
              raise RuntimeError("Unannotated field: %s" % key)
          try:
              kwargs[key] = self.map_with_type(value, field.type)
          except DeepTypeError as err:
              err.prepend_attr(key)
              raise err
      # TODO Remove noqa when flake8 will understand kw_only added in attrs-18.2.0.
      try:
          return type_(**kwargs)  # noqa
      except (ValueError, TypeError) as err:
          raise DeepTypeError(str(err)) from None
  
imports: from abc import ABC, abstractmethod
  from enum import Enum
  from inspect import isclass
  from itertools import chain
  from typing import Any, ClassVar, Dict, List, Optional, Sized, Type, TypeVar, Union
  import attr
label_desc: Use image node_id 3 for calling the Loader obj's underlying member method code with example usage: obj.map_schema(data, type_) and returns: type_