def settings(
        self,
        cache=None,
        parallel=None,
        workers=None,
        min_task_size=None,
        prefetch: Optional[int] = None,
        sys: Optional[bool] = None,
    ) -> "Self":
        """Change settings for chain.

        This function changes specified settings without changing not specified ones.
        It returns chain, so, it can be chained later with next operation.

        Parameters:
            cache : data caching (default=False)
            parallel : number of thread for processors. True is a special value to
                enable all available CPUs (default=1)
            workers : number of distributed workers. Only for Studio mode. (default=1)
            min_task_size : minimum number of tasks (default=1)
            prefetch: number of workers to use for downloading files in advance.
                      This is enabled by default and uses 2 workers.
                      To disable prefetching, set it to 0.

        Example:
            ```py
            chain = (
                chain
                .settings(cache=True, parallel=8)
                .map(laion=process_webdataset(spec=WDSLaion), params="file")
            )
            ```
        """
        if sys is None:
            sys = self._sys
        settings = copy.copy(self._settings)
        settings.add(Settings(cache, parallel, workers, min_task_size, prefetch))
        return self._evolve(settings=settings, _sys=sys)
Change settings for chain.

        This function changes specified settings without changing not specified ones.
        It returns chain, so, it can be chained later with next operation.

        Parameters:
            cache : data caching (default=False)
            parallel : number of thread for processors. True is a special value to
                enable all available CPUs (default=1)
            workers : number of distributed workers. Only for Studio mode. (default=1)
            min_task_size : minimum number of tasks (default=1)
            prefetch: number of workers to use for downloading files in advance.
                      This is enabled by default and uses 2 workers.
                      To disable prefetching, set it to 0.

        Example:
            ```py
            chain = (
                chain
                .settings(cache=True, parallel=8)
                .map(laion=process_webdataset(spec=WDSLaion), params="file")
            )
            ```
        
src/datachain/lib/dc/datachain.py