<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def common_subexp_elimination(block=None, abs_thresh=1, percent_thresh=0):
 """ Common Subexpression Elimination for PyRTL blocks :param block: the block to run the subexpression elimination on :param abs_thresh: absolute threshold for stopping optimization :param percent_thresh: percent threshold for stopping optimization """

    block = working_block(block)
    net_count = _NetCount(block)

    while net_count.shrinking(block, percent_thresh, abs_thresh):
        net_table = _find_common_subexps(block)
        _replace_subexps(block, net_table)