code: def deserialize_dict(self, attr, dict_type):
          
          if isinstance(attr, list):
              return {x['key']: self.deserialize_data(x['value'], dict_type) for x in attr}
  
          if isinstance(attr, ET.Element):
              # Transform <Key>value</Key> into {"Key": "value"}
              attr = {el.tag: el.text for el in attr}
          return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()}
docs: Deserialize a dictionary.
  
          :param dict/list attr: Dictionary to be deserialized. Also accepts
           a list of key, value pairs.
          :param str dict_type: The object type of the items in the dictionary.
          :rtype: dict