def parse_uri(uri):
    t = uri.split("://")
    tmp = t[1]
    t = tmp.split("/", 1)
    tmp = t[0]
    path = t[1]
    t = tmp.split(":", 1)
    try:
        host = t[0]
        port = int(t[1])
    except __HOLE__:
        host = tmp
        port = 5683

    return str(host), port, path
dataset/ETHPy150Open Tanganelli/CoAPthon/coapthon/utils.py/parse_uri