def get_reg(facilitator_addr, proxy_addr, proxy_transport_list):
    """
    Get a client registration for proxy proxy_addr from the
    facilitator at facilitator_addr using a one-time
    socket. proxy_transport_list is a list containing the transport names that
    the flashproxy supports.

    Returns a dict with keys "client", "client-transport", "relay",
    and "relay-transport" if successful, or a dict with the key "client"
    mapped to the value "" if there are no registrations available for
    proxy_addr. Raises an exception otherwise."""
    f = fac_socket(facilitator_addr)

    # Form a list (in transact() format) with the transports that we
    # should send to the facilitator.  Then pass that list to the
    # transact() function.
    # For example, PROXY-TRANSPORT=obfs2 PROXY-TRANSPORT=obfs3.
    transports = [("PROXY-TRANSPORT", tp) for tp in proxy_transport_list]

    try:
        command, params = transact(f, "GET", ("FROM", format_addr(proxy_addr)), *transports)
    finally:
        f.close()
    response = {}
    check_back_in = param_first("CHECK-BACK-IN", params)
    if check_back_in is not None:
        try:
            float(check_back_in)
        except __HOLE__:
            raise ValueError("Facilitator returned non-numeric polling interval.")
        response["check-back-in"] = check_back_in
    if command == "NONE":
        response["client"] = ""
        return response
    elif command == "OK":
        client_spec = param_first("CLIENT", params)
        client_transport = param_first("CLIENT-TRANSPORT", params)
        relay_spec = param_first("RELAY", params)
        relay_transport = param_first("RELAY-TRANSPORT", params)
        if not client_spec:
            raise ValueError("Facilitator did not return CLIENT")
        if not client_transport:
            raise ValueError("Facilitator did not return CLIENT-TRANSPORT")
        if not relay_spec:
            raise ValueError("Facilitator did not return RELAY")
        if not relay_transport:
            raise ValueError("Facilitator did not return RELAY-TRANSPORT")
        # Check the syntax returned by the facilitator.
        client = parse_addr_spec(client_spec)
        relay = parse_addr_spec(relay_spec)
        response["client"] = format_addr(client)
        response["client-transport"] = client_transport
        response["relay"] = format_addr(relay)
        response["relay-transport"] = relay_transport
        return response
    else:
        raise ValueError("Facilitator response was not \"OK\"")
dataset/ETHPy150Open arlolra/flashproxy/flashproxy/fac.py/get_reg