def __deserialize_model(self, data, klass):
instance = klass()<EOL>for attr, attr_type in iteritems(instance.swagger_types):<EOL><INDENT>if data is not Noneand instance.attribute_map[attr] in dataand isinstance(data, (list, dict)):<EOL><INDENT>value = data[instance.attribute_map[attr]]<EOL>setattr(instance, attr, self.__deserialize(value, attr_type))<EOL><DEDENT><DEDENT>return instance<EOL>
Deserializes list or dict to model.

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