@task
@requires_config(StandaloneConfig)
def query_info(query_id):

    if env.host not in fabricapi.get_coordinator_role():
        return

    err_msg = 'Unable to retrieve information. Please check that the ' \
              'query_id is correct, or check that server is up with ' \
              'command: server status'
    req = get_request(request_url(QUERY_REQUEST_EXT + query_id), err_msg)
    query_info_file_name = os.path.join(TMP_PRESTO_DEBUG,
                                        'query_info_' + query_id + '.json')

    if not os.path.exists(TMP_PRESTO_DEBUG):
        os.mkdir(TMP_PRESTO_DEBUG)

    with open(query_info_file_name, 'w') as out_file:
        out_file.write(json.dumps(req.json(), indent=4))

    print('Gathered query information in file: ' + query_info_file_name)
Replace the keyed message; raise KeyError if it doesn't exist.
dataset/ETHPy150Open prestodb/presto-admin/prestoadmin/collect.py/query_info--crossover with--dataset/ETHPy150Open babble/babble/include/jython/Lib/mailbox.py/_singlefileMailbox.__setitem__