def test_worker(from_idx, to_idx, params):
    """
    the worker to test multi-process
    """
    params = params
    succ = set()
    fail = set()
    for idx in range(from_idx, to_idx):
        try:
            succ.add(idx)
        except ValueError:
            fail.add(idx)
    return (succ, fail)
def test_worker ( from_idx , to_idx , params ) : params = params succ = set ( ) fail = set ( ) for idx in range ( from_idx , to_idx ) : try : succ . add ( idx ) except ValueError : fail . add ( idx ) return ( succ , fail )
the worker to test multi-process