def _create_workspace(self, extension):
        """ Create the Workspace object for the given extension.

        Parameters
        ----------
        extension : Extension
            The extension object of interest.

        Returns
        -------
        result : Workspace
            The workspace object for the given extension.

        """
        if extension.factory is None:
            msg = "extension '%s' does not declare a workspace factory"
            raise ValueError(extension.qualified_id % msg)

        workspace = extension.factory(self.workbench)
        if not isinstance(workspace, Workspace):
            msg = "extension '%s' created non-Workspace type '%s'"
            args = (extension.qualified_id, type(workspace).__name__)
            raise TypeError(msg % args)

        return workspace
dataset/ETHPy150Open nucleic/enaml/enaml/workbench/ui/ui_plugin.py/UIPlugin._create_workspace/swapped operands of `%`