code: def _run_clone_command(repo_url, dest_dir):
      """Run the 'git clone' command with the repo url and the directory to clone the repo into.
  
      Args:
          repo_url (str): Git repo url to be cloned.
          dest_dir: (str): Local path where the repo should be cloned into.
  
      Raises:
          CalledProcessError: If failed to clone git repo.
      """
      my_env = os.environ.copy()
      if repo_url.startswith("https://"):
          my_env["GIT_TERMINAL_PROMPT"] = "0"
          subprocess.check_call(
              ["git", "clone", repo_url, dest_dir], env=my_env
          )
      elif repo_url.startswith("git@") or repo_url.startswith("ssh://"):
          try:
              with tempfile.TemporaryDirectory() as tmp_dir:
                  custom_ssh_executable = Path(tmp_dir) / "ssh_batch"
                  with open(custom_ssh_executable, "w") as pipe:
                      print("#!/bin/sh", file=pipe)
                      print("ssh -oBatchMode=yes $@", file=pipe)
                  os.chmod(custom_ssh_executable, 0o511)
                  my_env["GIT_SSH"] = str(custom_ssh_executable)
                  subprocess.check_call(
                      ["git", "clone", repo_url, dest_dir], env=my_env
                  )
          except subprocess.CalledProcessError:
              del my_env["GIT_SSH"]
              subprocess.check_call(
                  ["git", "clone", repo_url, dest_dir], env=my_env
              )
  
imports: from __future__ import absolute_import
  import os
  from pathlib import Path
  import subprocess
  import tempfile
  import warnings
  import six
  from six.moves import urllib
label_desc: Use image node_id 10 for calling a global function with example usage: _run_clone_command(repo_url, dest_dir) without return types