def print_trace_session(shell, session, session_id):
    """
    Lookup a trace by session and trace session ID, then print it.
    """
    trace = QueryTrace(session_id, session)
    try:
        trace.populate()
    except TraceUnavailable:
        shell.printerr("Session %s wasn't found." % session_id)
    else:
        print_trace(shell, trace)
dataset/ETHPy150Open francelabs/datafari/cassandra/pylib/cqlshlib/tracing.py/print_trace_session/original