code: def _clone_command_for_codecommit(git_config, dest_dir):
      """Check if a git_config param representing a CodeCommit repo is valid.
  
      If it is, create the command to git clone the repo, and run it.
  
      Args:
          git_config ((dict[str, str]): Git configurations used for cloning files,
              including ``repo``, ``branch`` and ``commit``.
          dest_dir (str): The local directory to clone the Git repo into.
  
      Raises:
          ValueError: If git_config['repo'] is in the wrong format.
          CalledProcessError: If failed to clone git repo.
      """
      is_https = git_config["repo"].startswith("https://git-codecommit")
      is_ssh = git_config["repo"].startswith("ssh://git-codecommit")
      if not is_https and not is_ssh:
          raise ValueError("Invalid Git url provided.")
      if "2FA_enabled" in git_config:
          warnings.warn(
              "CodeCommit does not support 2FA, '2FA_enabled' will be ignored."
          )
      if "token" in git_config:
          warnings.warn(
              "There are no tokens in CodeCommit, the token provided will be ignored."
          )
      if is_ssh:
          _clone_command_for_ssh(git_config, dest_dir)
      else:
          _clone_command_for_codecommit_https(git_config, dest_dir)
  
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 8 for calling a global function with example usage: _clone_command_for_codecommit(git_config, dest_dir) without return types