def guard_retract(analysis):
    """ Return whether the transition "retract" can be performed or not
    """
    # Cannot retract if there are dependents that cannot be retracted
    if not is_transition_allowed(analysis.getDependents(), "retract"):
        return False

    dependencies = analysis.getDependencies()
    if not dependencies:
        return True

    # Cannot retract if all dependencies have been verified
    if all(map(lambda an: IVerified.providedBy(an), dependencies)):
        return False

    return True
def guard_retract ( analysis ) : if not is_transition_allowed ( analysis . getDependents ( ) , "retract" ) : return False dependencies = analysis . getDependencies ( ) if not dependencies : return True if all ( map ( lambda an : IVerified . providedBy ( an ) , dependencies ) ) : return False return True
Return whether the transition "retract" can be performed or not