backported for v2.7 (@staticmethod)