code: def _get_base_url(repo: str, lfs: bool = False) -> str:
      """
      Gets the base github url from a repo specification string
  
      :param repo: The location of the model repo in format "user/repo[:branch]".
          If no branch is found will default to "main"
      :param lfs: whether the url is for downloading lfs models
      :return: the base github url for downloading
      """
      repo_owner, repo_name, repo_ref = _parse_repo_info(repo)
  
      if lfs:
          return f"https://media.githubusercontent.com/media/{repo_owner}/{repo_name}/{repo_ref}/"
      return f"https://raw.githubusercontent.com/{repo_owner}/{repo_name}/{repo_ref}/"
  
imports: import hashlib
  import json
  import os
  import sys
  import tarfile
  from io import BytesIO
  from os.path import join
  from typing import IO, Any, Dict, List, Optional, Set, Tuple, cast
  from urllib.error import HTTPError
  from urllib.request import urlopen
  import onnx
label_desc: Use image node_id 5 for calling a global function with example usage: _get_base_url(repo, lfs) and returns: str, repo_owner, str, repo_name, str, repo_ref, str, str, repo_owner, str, repo_name, str, repo_ref, str