What was the motivation for making this a @staticmethod rather than just a top-level function?