class_docstr: Downloading from hub
docstr: 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.
code: 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
  
file_path: towhee/towhee/hub/cache_manager.py
imports: import os
  from pathlib import Path
  import threading
  from .downloader import download_operator, download_pipeline, repo_tag_path
label_desc: Use image node_id 4 for calling the CacheManager obj's underlying member method code with example usage: obj.get_operator(operator, tag, install_reqs, latest) and returns: op_path, op_path