def log_tabular(key, val):
    '\n    Log a value of some diagnostic\n    Call this once for each diagnostic quantity, each iteration\n    '
    if G.first_row:
        G.log_headers.append(key)
    else:
        assert (key in G.log_headers), ("Trying to introduce a new key %s that you didn't include in the first iteration" % key)
    assert (key not in G.log_current_row), ('You already set %s this iteration. Maybe you forgot to call dump_tabular()' % key)
    G.log_current_row[key] = val
Log a value of some diagnostic
Call this once for each diagnostic quantity, each iteration
def log_tabular(key, val):
    '\n    Log a value of some diagnostic\n    Call this once for each diagnostic quantity, each iteration\n    '
    if G.first_row:
        G.log_headers.append(key)
    else:
        assert (key in G.log_headers), ("Trying to introduce a new key %s that you didn't include in the first iteration" % key)
    assert (key not in G.log_current_row), ('You already set %s this iteration. Maybe you forgot to call dump_tabular()' % key)
    G.log_current_row[key] = val