def import_and_wrap_deprecated(module_name, module_dict, warn_import=True):
 if warn_import:
  deprecated_import(module_name)
 from importlib import import_module
 module = import_module(module_name)
 for attr in module.__all__:
  module_dict[attr] = deprecated(getattr(module, attr))

def import_and_wrap_deprecated ( module_name , module_dict , warn_import = True ) : if warn_import : deprecated_import ( module_name ) from importlib import import_module module = import_module ( module_name ) for attr in module . __all__ : module_dict [ attr ] = deprecated ( getattr ( module , attr ) )
usage: import_and_wrap_deprecated(conda .