diff --git a/src/km3io/tools.py b/src/km3io/tools.py
index 377b61155e1e0048537c1cb6a031f90278c30278..1c92e471febd6b9acbfbab577f69fc6afb318616 100644
--- a/src/km3io/tools.py
+++ b/src/km3io/tools.py
@@ -540,6 +540,15 @@ def is_3dmuon(trigger_mask):
 
 
 def get_w2defs_idx(f):
+    """
+    Get the correct w2list_idx for the given file, or None if there is none.
+
+    Parameters
+    ----------
+    f : km3io.OfflineReader
+        The file.
+
+    """
     w2s_idx = {
         "genhen": km3io.definitions.w2list_genhen_idx,
         "gseagen": km3io.definitions.w2list_gseagen_idx,