def __init__(self, data=None):
        """Initializing with another shared_stack
        makes a stack with the same head."""
        if data is None:
            data = []
        elif isinstance(data, _shared_stack):
            data, _ = data._headstack()
        # Implemented as a dict:
        # {'head': head_list, list_id: previous_list, ...
        #  'root': root_list, root_list_id: True}
        self._stack = {'head': data, 'root': data, id(data): True}
Initializing with another shared_stack
        makes a stack with the same head.
recipes/Python/576728_Pure_PythimplementatiPEP_380_yield_/recipe-576728.py