human
Complete this python program:
def dataprovider_factory(name, settings=None):
assistant
#Here is the Python program you requested.

    """Wraps a class method and marks it as a dataprovider factory and creates a
    function to parse query strings to __init__ arguments as the
    `parse_query_string_settings` attribute of the factory function.
    An example use of the `parse_query_string_settings`::
    kwargs = dataset.datatype.dataproviders[ provider ].parse_query_string_settings( query_kwargs )
    return list( dataset.datatype.dataprovider( dataset, provider, **kwargs ) )
    :param name: what name/key to register the factory under in `cls.dataproviders`
    :type name: any hashable var
    :param settings: dictionary containing key/type pairs for parsing query strings
    to __init__ arguments
    :type settings: dictionary
    """
    def parse_query_string_settings(query_kwargs):
        return _parse_query_string_settings(query_kwargs, settings)
    def named_dataprovider_factory(func):
        setattr(func, _DATAPROVIDER_METHOD_NAME_KEY, name)
        setattr(func, 'parse_query_string_settings', parse_query_string_settings)
        setattr(func, 'settings', settings)
        @wraps(func)
        def wrapped_dataprovider_factory(self, *args, **kwargs):
            return func(self, *args, **kwargs)
        return wrapped_dataprovider_factory
    return named_dataprovider_factory