def import_user_packages_module(self):
        if self._userpackages is not None:
            return self._userpackages
        # Imports user packages directory
        old_sys_path = copy.copy(sys.path)
        userPackageDir = system.get_vistrails_directory('userPackageDir')
        if userPackageDir is not None:
            sys.path.insert(0, os.path.join(userPackageDir, os.path.pardir))
            try:
                import userpackages
            except ImportError:
                debug.critical('ImportError: "userpackages" sys.path: %s' %
                               sys.path)
                raise
            finally:
                sys.path = old_sys_path
            os.environ['VISTRAILS_USERPACKAGES_DIR'] = userPackageDir
            self._userpackages = userpackages
            return userpackages
        # possible that we don't have userPackageDir set!
        return None
Imports the 'userspackages' package.
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/core/packagemanager.py/PackageManager.import_user_packages_module