def _getSlotValue(name, slotData, default=None):
    """
    Find the value of the named slot in the given stack of slot data.
    """
    for slotFrame in slotData[::-1]:
        if slotFrame is not None and name in slotFrame:
            return slotFrame[name]
    else:
        if default is not None:
            return default
        raise UnfilledSlot(name)

    Find the value of the named slot in the given stack of slot data.
    
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/_flatten.py