def __deserialize_model(self, data, klass):
if not klass.swagger_types and not hasattr(klass, '<STR_LIT>'):<EOL><INDENT>return data<EOL><DEDENT>kwargs = {}<EOL>if klass.swagger_types is not None:<EOL><INDENT>for attr, attr_type in iteritems(klass.swagger_types):<EOL><INDENT>if data is not Noneand klass.attribute_map[attr] in dataand isinstance(data, (list, dict)):<EOL><INDENT>value = data[klass.attribute_map[attr]]<EOL>kwargs[attr] = self.__deserialize(value, attr_type)<EOL><DEDENT><DEDENT><DEDENT>instance = klass(**kwargs)<EOL>if hasattr(instance, '<STR_LIT>'):<EOL><INDENT>klass_name = instance.get_real_child_model(data)<EOL>if klass_name:<EOL><INDENT>instance = self.__deserialize(data, klass_name)<EOL><DEDENT><DEDENT>return instance<EOL>
Deserializes list or dict to model.

:param data: dict, list.
:param klass: class literal.
:return: model object.