def test_recursion_limit(deep_stats):
    deepest_stats = list(spread_stats(deep_stats))[-1]
    assert deepest_stats.deep_time > 0
    # It exceeded the recursion limit until 6fe1b48.
    assert deep_stats.children[0].deep_time == deepest_stats.deep_time
    # Pickling.
    assert isinstance(deep_stats, RecordingStatistics)
    data = pickle.dumps(deep_stats)
    frozen_stats = pickle.loads(data)
    assert isinstance(frozen_stats, FrozenStatistics)
    deepest_frozen_stats = list(spread_stats(frozen_stats))[-1]
    assert deepest_stats.deep_time == deepest_frozen_stats.deep_time
dataset/ETHPy150Open what-studio/profiling/test/test_stats.py/test_recursion_limit/original