code: def identify_repo(repo_url):
      
      repo_url_values = repo_url.split('+')
      if len(repo_url_values) == 2:
          repo_type = repo_url_values[0]
          if repo_type in ["git", "hg"]:
              return repo_type, repo_url_values[1]
          else:
              raise UnknownRepoType
      else:
          if 'git' in repo_url:
              return 'git', repo_url
          elif 'bitbucket' in repo_url:
              return 'hg', repo_url
          else:
              raise UnknownRepoType
docs: Determine if `repo_url` should be treated as a URL to a git or hg repo.
  
      Repos can be identified by prepending "hg+" or "git+" to the repo URL.
  
      :param repo_url: Repo URL of unknown type.
      :returns: ('git', repo_url), ('hg', repo_url), or None.