def set_module(name):
    """
    Set the __module__ attribute on a class. Very
    similar to numpy.core.overrides.set_module.
    """

    def add_module(cls):
        cls.__module__ = name
        return cls

    return add_module