@Substitution(name='groupby')
    @Appender(_doc_template)
    def tail(self, n=5):
        mask = self._cumcount_array(ascending=False) < n
        return self._selected_obj[mask]
Test locking the state in another process locks
dataset/ETHPy150Open pydata/pandas/pandas/core/groupby.py/GroupBy.tail--crossover with--dataset/ETHPy150Open duerrp/pyexperiment/tests/test_state.py/TestStateHandler.test_other_process_locks