    def get_pipeline(self, pipeline: str, tag: str, latest: bool) -> Path:
        """Obtain the path to the requested pipeline.

        This function will obtain the first reference to the pipeline from the cache locations.
        If no pipeline is found, this function will download it to the default cache location
        from the Towhee hub.

        Args:
            pipeline (`str`):
                The pipeline in 'author/repo' format. Author will be 'local' if locally imported.
            tag (`str`):
                Which tag version to use of the pipeline. Will use 'main' if locally imported.
            latest (`bool`):
                Whether to download the latest files.

        Returns:
            (Path | None)
                Returns the path of the operator, None if a local operator isnt found.

        Raises:
            (`ValueError`):
                Incorrect pipeline format.
        """
        operator_split = pipeline.split('/')
        # For now assuming all piplines will be classifed as 'author/repo'.
        if len(operator_split) != 2:
            raise ValueError('''Incorrect operator format, should be '<author>/<operator_repo>'.''')
        author, repo = operator_split
        pipe_path = self._pipe_cache_name(author, repo, tag)

        if pipe_path.is_dir() and not latest:
            return pipe_path

        with self._download_lock:
            download_path = pipe_path.parent.parent
            download_pipeline(author, repo, tag, download_path, latest)
            return pipe_path
Obtain the path to the requested pipeline.

This function will obtain the first reference to the pipeline from the cache locations.
If no pipeline is found, this function will download it to the default cache location
from the Towhee hub.

Args:
pipeline (`str`):
The pipeline in 'author/repo' format. Author will be 'local' if locally imported.
tag (`str`):
Which tag version to use of the pipeline. Will use 'main' if locally imported.
latest (`bool`):
Whether to download the latest files.

Returns:
(Path | None)
Returns the path of the operator, None if a local operator isnt found.

Raises:
(`ValueError`):
Incorrect pipeline format.
towhee/hub/cache_manager.py