diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index aab69550a02847e11d3ef9f825f79d58b02be6f6..c4ffdf887ee34c5e11cb41be066b65e0ec5354f2 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -460,6 +460,14 @@ class FederationHandler(BaseHandler):
     @measure_func("_filter_events_for_server")
     @defer.inlineCallbacks
     def _filter_events_for_server(self, server_name, room_id, events):
+        """Filter the given events for the given server, redacting those the
+        server can't see.
+
+        Assumes the server is currently in the room.
+
+        Returns
+            list[FrozenEvent]
+        """
         # First lets check to see if all the events have a history visibility
         # of "shared" or "world_readable". If thats the case then we don't
         # need to check membership (as we know the server is in the room).