def cross_boundary(prev_obj, obj):
    """ Check permissions as we move between object instances. """
    if prev_obj is None:
        return

    if isinstance(obj, _SecuredAttribute):
        # a secure attribute can live in unsecure class so we have to set
        # while we walk the route
        obj.parent = prev_obj

    if hasattr(prev_obj, '_pecan'):
        if prev_obj._pecan.get('unlocked', []) not in obj:
            handle_security(prev_obj)
dataset/ETHPy150Open pecan/pecan/pecan/secure.py/cross_boundary/swapped operands of `not in`