def METHOD_NAME(url, username=None, password=None, ask=ask_cmd_line):
    done = False
    auth = None
    while not done:
        if username and password:
            auth = HTTPBasicAuth(username, password)
        req = requests.get(url, auth=auth)
        if req.status_code == 401:
            result = ask(username, password)
            if result:
                username, password = result
                auth = HTTPBasicAuth(username, password)
            else:
                return
        else:
            done = True
    if req.status_code == 200:
        f = BytesIO()
        f.write(req.content)
        return astropy.io.votable.parse_single_table(f)
    else:
        return req