def METHOD_NAME(data, klass):
    """Deserializes dict, list, str into an object.
    :param data: dict, list or str.
    :param klass: class literal, or string of class name.
    :return: object.
    """
    if data is None:
        return None
    if klass in six.integer_types or klass in (float, str, bool, bytearray):
        return _deserialize_primitive(data, klass)
    elif klass == object:
        return _deserialize_object(data)
    elif klass == datetime.date:
        return deserialize_date(data)
    elif klass == datetime.datetime:
        return deserialize_datetime(data)
    elif typing_utils.is_generic(klass):
        if typing_utils.is_list(klass):
            if isinstance(klass.__args__[0], typing.TypeVar):
                return data
            return _deserialize_list(data, klass.__args__[0])
        if typing_utils.is_dict(klass):
            if isinstance(klass.__args__[1], typing.TypeVar):
                return data
            return _deserialize_dict(data, klass.__args__[1])
    else:
        return deserialize_model(data, klass)