code: def _insert_token_to_repo_url(url, token):
      """Insert the token to the Git repo url, to make a component of the git clone command.
  
      This method can only be called when repo_url is an https url.
  
      Args:
          url (str): Git repo url where the token should be inserted into.
          token (str): Token to be inserted.
  
      Returns:
          str: the component needed fot the git clone command.
      """
      index = len("https://")
      if url.find(token) == index:
          return url
      return url.replace("https://", "https://" + token + "@")
  
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 11 for calling a global function with example usage: _insert_token_to_repo_url(url, token) and returns: url, url