code: def verify_repo_matches_url(repo, url):
      
      repo_parts = urlparse(repo)
      url_parts = urlparse(url)
      errors = []
      repo_path_parts = repo_parts.path.split('/')
      url_path_parts = url_parts.path.split('/')
      if repo_parts.hostname != url_parts.hostname:
          errors.append("verify_repo_matches_url: Hostnames don't match! {} {}".format(
              repo_parts.hostname, url_parts.hostname
          ))
      if not url_parts.path.startswith(repo_parts.path) or \
              url_path_parts[:len(repo_path_parts)] != repo_path_parts:
          errors.append("verify_repo_matches_url: Paths don't match! {} {}".format(
              repo_parts.path, url_parts.path
          ))
      if errors:
          log.warning("\n".join(errors))
          return False
      return True
docs: Verify ``url`` is a part of ``repo``.
  
      We were using ``startswith()`` for a while, which isn't a good comparison.
      This function allows us to ``urlparse`` and compare host and path.
  
      Args:
          repo (str): the repo url
          url (str): the url to verify is part of the repo
  
      Returns:
          bool: ``True`` if the repo matches the url.