parameters: (self, url)
return_statement: return (user_repo, branch)
docstring: Extract the username/repo and branch name from the URL
  
          :param url:
              The URL to extract the info from, in one of the forms:
                https://github.com/{user}/{repo}
                https://github.com/{user}/{repo}/tree/{branch}
  
          :return:
              A tuple of (user/repo, branch name) or (None, None) if no match
docstring_summary: Extract the username/repo and branch name from the URL
docstring_tokens: Extract the username / repo and branch name from the URL
function: def _user_repo_branch(self, url):
          """
          Extract the username/repo and branch name from the URL
  
          :param url:
              The URL to extract the info from, in one of the forms:
                https://github.com/{user}/{repo}
                https://github.com/{user}/{repo}/tree/{branch}
  
          :return:
              A tuple of (user/repo, branch name) or (None, None) if no match
          """
  
          branch = 'master'
          branch_match = re.match('https?://github.com/[^/]+/[^/]+/tree/([^/]+)/?$', url)
          if branch_match != None:
              branch = branch_match.group(1)
  
          repo_match = re.match('https?://github.com/([^/]+/[^/]+)($|/.*$)', url)
          if repo_match == None:
              return (None, None)
  
          user_repo = repo_match.group(1)
          return (user_repo, branch)
function_tokens: def _user_repo_branch ( self , url ) : branch = 'master' branch_match = re . match ( 'https?://github.com/[^/]+/[^/]+/tree/([^/]+)/?$' , url ) if branch_match != None : branch = branch_match . group ( 1 ) repo_match = re . match ( 'https?://github.com/([^/]+/[^/]+)($|/.*$)' , url ) if repo_match == None : return ( None , None ) user_repo = repo_match . group ( 1 ) return ( user_repo , branch )