def _apply_callables(self, acl, obj=None):
        new_acl = []
        for i, ace in enumerate(acl):
            principal = ace[1]
            if six.callable(principal):
                ace = principal(ace=ace, request=self.request, obj=obj)
                if not ace:
                    continue
                if not isinstance(ace[0], (list, tuple)):
                    ace = [ace]
                ace = [(a, b, validate_permissions(c)) for a, b, c in ace]
            else:
                ace = [ace]
            new_acl += ace
        return tuple(new_acl)
L{Server.write} discards bytes passed to it if called after it has lost
dataset/ETHPy150Open ramses-tech/ramses/ramses/acl.py/BaseACL._apply_callables--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/internet/test/test_tcp.py/TCPServerTests.test_writeAfterDisconnect