code: def _insert_username_and_password_to_repo_url(
      url, username, password
  ):
      """Insert username and password to the Git repo url to make a component of 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.
          username (str): Username to be inserted.
          password (str): Password to be inserted.
  
      Returns:
          str: the component needed for the git clone command.
      """
      password = urllib.parse.quote_plus(password)
      # urllib parses ' ' as '+', but what we need is '%20' here
      password = password.replace("+", "%20")
      index = len("https://")
      return url[:index] + username + ":" + password + "@" + url[index:]
  
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 12 for calling a global function with example usage: _insert_username_and_password_to_repo_url(url, username, password) and returns: unknown