@defer.inlineCallbacks
    @log_function
    def on_make_leave_request(self, room_id, user_id):
        builder = self.event_builder_factory.new({
            "type": EventTypes.Member,
            "content": {"membership": Membership.LEAVE},
            "room_id": room_id,
            "sender": user_id,
            "state_key": user_id,
        })

        event, context = yield self._create_new_client_event(
            builder=builder,
        )

        self.auth.check(event, auth_events=context.current_state)

        defer.returnValue(event)
We've received a /make_leave/ request, so we create a partial
dataset/ETHPy150Open matrix-org/synapse/synapse/handlers/federation.py/FederationHandler.on_make_leave_request