docs: def watdarepo(repo_url, mode='d', guess=False, repo_aliases=REPO_ALIASES, hosting_services=HOSTING_SERVICES):
      """
      Gets vcs and hosting service for repo_urls
      :param repo_url: Repo URL of unknown type.
      :param mode: Return dictionary (default) or object
      :param guess: Whether or not to make guesses
      :returns: Hosting service or raises UnknownHostingService exception.
      """
  
      repo_url = unicode(repo_url)
  
      # Set the repo_url
      repo_data = {'repo_url': repo_url}
  
      # Get the VCS type
      try:
          repo_data['vcs'] = identify_vcs(repo_url, repo_aliases=repo_aliases)
      except UnknownVCS:
          repo_data['vcs'] = None
  
      # Get the hosting service
      try:
          repo_data['hosting_service'] = identify_hosting_service(repo_url, hosting_services=hosting_services)
      except UnknownHostingService:
          repo_data['hosting_service'] = None
  
      # If mode is 'c' or 'o', return an object representation of data.
      if mode in ('c', 'o'):
          # Define the c/o response class
          Repo = type(str('Repo'), (object,), repo_data)
          # Return the c/o response object
          return Repo()
  
      # return dictionary representation of data.
      return repo_data