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

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

        Args:
            operator (`str`):
                The operator in 'author/repo' format. Author will be 'local' if locally imported.
            tag (`str`):
                Which tag version to use of the opeartor. Will use 'main' if locally imported.
            install_reqs (`bool`):
                Whether to download the python packages if a requirements.txt file is included in the repo.
            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 opeartor format.
        """
        operator_split = operator.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
        op_path = self._op_cache_name(author, repo, tag)

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

        with self._download_lock:
            download_path = op_path.parent.parent
            download_operator(author, repo, tag, download_path, install_reqs, latest)
            return op_path
Obtain the path to the requested operator.

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

Args:
operator (`str`):
The operator in 'author/repo' format. Author will be 'local' if locally imported.
tag (`str`):
Which tag version to use of the opeartor. Will use 'main' if locally imported.
install_reqs (`bool`):
Whether to download the python packages if a requirements.txt file is included in the repo.
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 opeartor format.
towhee/hub/cache_manager.py