code: def decode_dict(
              cls,
              obj,  # type: Dict[Any, Any]
              key_type,  # ConjureTypeType
              item_type,  # ConjureTypeType
      ):  # type: (...) -> Dict[Any, Any]
          
          if not isinstance(obj, dict):
              raise Exception("expected a python dict")
          if key_type == str or isinstance(key_type, BinaryType) \
              or (inspect.isclass(key_type)
                  and issubclass(key_type, ConjureEnumType)):
              return dict((
                  (cls.do_decode(x[0], key_type), cls.do_decode(x[1], item_type))
                  for x in obj.items()))
  
          return dict((
              (cls.do_decode(json.loads(x[0]), key_type),
               cls.do_decode(x[1], item_type))
              for x in obj.items()))
docs: Decodes json into a dictionary, handling conversion of the
          keys/values (the keys/values may themselves require conversion).
  
          Args:
              obj: the json object to decode
              key_type: a class object which is the conjure type
                  of the keys in this dict
              item_type: a class object which is the conjure type
                  of the values in this dict
          Returns:
              A python dictionary, where the keys are instances of type key_type
              and the values are of type value_type.