@staticmethod
def staticclassattribute(function):
    """Return given function as a staticmethod, handle None as None.

        This allows storing the function as a class attribute.
        """
    return staticmethod(function) if function is not None else None
