code: def _convert_github_url(url_path: str) -> Tuple[str, Optional[str]]:
      """Convert a link to a file on a github repo in a link to the raw github object."""
      parsed = urlparse(url_path)
      sub_directory = None
      if (
          parsed.scheme in ("http", "https", "s3")
          and parsed.netloc == "github.com"
      ):
          if "blob" in url_path:
              if not url_path.endswith(".py"):
                  raise ValueError(
                      f"External import from github at {url_path} should point to a file ending with '.py'"
                  )
              url_path = url_path.replace(
                  "blob", "raw"
              )  # Point to the raw file
          else:
              # Parse github url to point to zip
              github_path = parsed.path[1:]
              repo_info, branch = (
                  github_path.split("/tree/")
                  if "/tree/" in github_path
                  else (github_path, "master")
              )
              repo_owner, repo_name = repo_info.split("/")
              url_path = f"https://github.com/{repo_owner}/{repo_name}/archive/{branch}.zip"
              sub_directory = f"{repo_name}-{branch}"
      return url_path, sub_directory
  
imports: import copy
  import functools
  import itertools
  import multiprocessing.pool
  import os
  import queue
  import re
  import types
  import warnings
  from contextlib import contextmanager
  from dataclasses import fields, is_dataclass
  from multiprocessing import Manager
  from queue import Empty
  from shutil import disk_usage
  from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Tuple, TypeVar, Union
  from urllib.parse import urlparse
  import multiprocess
  import multiprocess.pool
  import numpy
  from tqdm.auto import tqdm
  from ..None import config
  from ..parallel import parallel_map
  from .None import logging
  from .None import tqdm
  from ._dill import Pickler, dump, dumps, pklregister
label_desc: Use image node_id 15 for calling a global function with example usage: _convert_github_url(url_path) and returns: url_path,  sub_directory