def extract_eliot_from_twisted_log(twisted_log_line):
    open_brace = twisted_log_line.find('{')
    close_brace = twisted_log_line.rfind('}')
    if open_brace == -1 or close_brace == -1:
        return None
    candidate = twisted_log_line[open_brace:close_brace + 1]
    try:
        fields = json.loads(candidate)
    except (ValueError, TypeError):
        return None
    # Eliot lines always have these two keys.
    if {"task_uuid", "timestamp"}.difference(fields):
        return None
    return candidate
Test that random state can be transferred from one theano graph to another.
dataset/ETHPy150Open ClusterHQ/flocker/flocker/testtools/_base.py/extract_eliot_from_twisted_log--crossover with--dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/sandbox/tests/test_rng_mrg.py/test_random_state_transfer