def ui_command_create(self, tag=None):
        '''
        Creates a new Target Portal Group within the target. The
        I{tag} must be a positive integer value, optionally prefaced
        by 'tpg'. If omitted, the next available Target Portal Group
        Tag (TPGT) will be used.

        SEE ALSO
        ========
        B{delete}
        '''
        self.assert_root()

        if tag:
            if tag.startswith("tpg"):
                tag = tag[3:]

            try:
                tag = int(tag)
            except ValueError:
                raise ExecutionError("Tag argument must be a number.")

        tpg = TPG(self.rtsnode, tag, mode='create')
        if self.shell.prefs['auto_enable_tpgt']:
            tpg.enable = True

        if tpg.has_feature("auth"):
            tpg.set_attribute("authentication", 0)

        self.shell.log.info(tpg.tag % "Created TPG %s.")

        if tpg.has_feature("nps") and self.shell.prefs['auto_add_default_portal']:
            try:
                NetworkPortal(tpg, "0.0.0.0")
                self.shell.log.info("Global pref auto_add_default_portal=true")
                self.shell.log.info("Created default portal listening on all IPs"
                                    " (0.0.0.0), port 3260.")
            except RTSLibError:
                self.shell.log.info("Default portal not created, TPGs within a " +
                                    "target cannot share ip:port.")

        ui_tpg = UITPG(tpg, self)
        return self.new_node(ui_tpg)
dataset/ETHPy150Open agrover/targetcli-fb/targetcli/ui_target.py/UIMultiTPGTarget.ui_command_create/swapped operands of `%`