def deprecate_module_attr(mod, deprecated):
deprecated = set(deprecated)<EOL>class Wrapper(object):<EOL><INDENT>def __getattr__(self, attr):<EOL><INDENT>if attr in deprecated:<EOL><INDENT>warnings.warn("<STR_LIT>".format(attr), GBDXDeprecation)<EOL><DEDENT>return getattr(mod, attr)<EOL><DEDENT>def __setattr__(self, attr, value):<EOL><INDENT>if attr in deprecated:<EOL><INDENT>warnings.warn("<STR_LIT>".format(attr), GBDXDeprecation)<EOL><DEDENT>return setattr(mod, attr, value)<EOL><DEDENT><DEDENT>return Wrapper()<EOL>
Return a wrapped object that warns about deprecated accesses