class_docstr: TODO: Reimplement functions with robust library: https://github.com/gitpython-developers/GitPython
  
  This CodeDriver manages source control management for the project using git
class_docstr_tok: ["TODO",":","Reimplement","functions","with","robust","library",":","https",":","\/\/github.com\/gitpython-developers\/GitPython","This","CodeDriver","manages","source","control","management","for","the","project","using","git"]
code: def _parse_git_url(self, original_git_url, mode="https"):
      if original_git_url[-4:] != ".git":
          original_git_url = original_git_url + ".git"
      p = parse(original_git_url)
  
      if not p.valid:
          raise GitUrlArgumentError(
              __(
                  "error",
                  "controller.code.driver.git._parse_git_url.url",
                  original_git_url,
              )
          )
      if mode == "ssh":
          clone_git_url = p.url2ssh
      elif mode == "https":
          clone_git_url = p.url2https
      elif mode == "http":
          # If unsecured specified http connection used instead
          clone_git_url = "://".join(
              ["http", p.url2https.split("://")[1]]
          )
      else:
          raise GitUrlArgumentError(
              __(
                  "error",
                  "controller.code.driver.git._parse_git_url.access",
                  original_git_url,
              )
          )
      return clone_git_url
  
imports: import os
  import shutil
  import subprocess
  import semver
  from io import open
  from giturlparse import parse
  from datmo.core.util.i18n import get
  from datmo.core.util.exceptions import PathDoesNotExist, GitUrlArgumentError, GitExecutionError, FileIOError, CommitDoesNotExist, CommitFailed, DatmoFolderInWorkTree, UnstagedChanges
  from datmo.core.controller.code.driver import CodeDriver
  from datmo.config import Config
label_desc: Use image node_id 14 for calling the GitCodeDriver obj's underlying member method code with example usage: obj._parse_git_url(original_git_url, mode) and returns: clone_git_url