<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def deparent_unreachable( reachable, shared ):
 """Eliminate all parent-links from unreachable objects from reachable objects """

    for id,shares in shared.iteritems():
        if id in reachable: # child is reachable
            filtered = [
                x 
                for x in shares 
                if x in reachable # only those parents which are reachable
            ]
            if len(filtered) != len(shares):
                shares[:] = filtered