code: def _parse_github_path(path: str) -> Tuple[str, str, str]:
      """Parse the absolute github path.
  
      Args:
        path: The full github path.
  
      Returns:
        repo: The repository identifiant.
        branch: Repository branch.
        subpath: The inner path.
  
      Raises:
        ValueError: If the path is invalid
      """
      err_msg = (
          f"Invalid github path: {path}. Expected format: "
          "`github://<owner>/<name>/tree/<branch>[/<path>]`."
      )
  
      if not path.startswith(_URI_PREFIX):
          raise ValueError(err_msg)
      if path.endswith("/"):
          raise ValueError(err_msg + " Trailing `/` not supported.")
      parts = path[len(_URI_PREFIX) :].split("/")
      if len(parts) < 4:
          raise ValueError(err_msg)
  
      # 'tensorflow', 'datasets', 'tree', 'master', ...
      owner, repo, tree, branch, *subpath = parts
      if tree != "tree":
          raise ValueError(
              err_msg + ". `/blob/` isn't accepted. Only `/tree/`."
          )
  
      return f"{owner}/{repo}", branch, "/".join(subpath)
  
imports: import dataclasses
  import functools
  import os
  import pathlib
  import posixpath
  from typing import Iterator, Mapping, MutableMapping, Optional, Set, Tuple
  from etils import epath
  import requests
  from tensorflow_datasets.core import utils
label_desc: Use image node_id 5 for calling a global function with example usage: _parse_github_path(path) and returns: owner, str, repo,  branch,  str