<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_new_username(ip, devicetype=None, timeout=_DEFAULT_TIMEOUT):
 """Interactive helper function to generate a new anonymous username. Args: ip: ip address of the bridge devicetype (optional):
 devicetype to register with the bridge. If unprovided, generates a device type based on the local hostname. timeout (optional, default=5):
 request timeout in seconds Raises: QhueException if something went wrong with username generation (for example, if the bridge button wasn't pressed). """

    res = Resource(_api_url(ip), timeout)
    prompt = "Press the Bridge button, then press Return: "
    # Deal with one of the sillier python3 changes
    if sys.version_info.major == 2:
        _ = raw_input(prompt)
    else:
        _ = input(prompt)

    if devicetype is None:
        devicetype = "qhue#{}".format(getfqdn())

    # raises QhueException if something went wrong
    response = res(devicetype=devicetype, http_method="post")

    return response[0]["success"]["username"]