code: def all_tags(repo: Optional[str] = None) -> List[str]:
      """Get all Git tags in a DVC repository.
  
      Args:
          repo (str, optional): location of the DVC repository.
              Defaults to the current project (found by walking up from the
              current working directory tree).
              It can be a URL or a file system path.
              Both HTTP and SSH protocols are supported for online Git repos
              (e.g. [user@]server:project.git).
      Returns:
          List[str]: Names of the Git tags.
      """
      with Repo.open(repo) as _repo:
          return _repo.scm.list_tags()
  
imports: from typing import List, Optional
  from dvc.repo import Repo
label_desc: Use image node_id 3 for calling a global function with example usage: all_tags(repo) and returns: _repo