def ParseIssueNumberArgument(arg):
    'Parses the issue argument and returns _ParsedIssueNumberArgument.'
    fail_result = _ParsedIssueNumberArgument()
    if arg.isdigit():
        return _ParsedIssueNumberArgument(issue=int(arg))
    if (not arg.startswith('http')):
        return fail_result
    url = gclient_utils.UpgradeToHttps(arg)
    try:
        parsed_url = urlparse.urlparse(url)
    except ValueError:
        return fail_result
    for cls in _CODEREVIEW_IMPLEMENTATIONS.itervalues():
        tmp = cls.ParseIssueURL(parsed_url)
        if (tmp is not None):
            return tmp
    return fail_result
Parses the issue argument and returns _ParsedIssueNumberArgument.
def ParseIssueNumberArgument(arg):
    
    fail_result = _ParsedIssueNumberArgument()
    if arg.isdigit():
        return _ParsedIssueNumberArgument(issue=int(arg))
    if (not arg.startswith('http')):
        return fail_result
    url = gclient_utils.UpgradeToHttps(arg)
    try:
        parsed_url = urlparse.urlparse(url)
    except ValueError:
        return fail_result
    for cls in _CODEREVIEW_IMPLEMENTATIONS.itervalues():
        tmp = cls.ParseIssueURL(parsed_url)
        if (tmp is not None):
            return tmp
    return fail_result