def remove(self, cmd):
        """
        Remove a command instance from the cmdset.

        Args:
            cmd (Command or str): Either the Command object to remove
                or the key of such a command.

        """
        cmd = self._instantiate(cmd)
        if cmd.key.startswith("__"):
            try:
                ic = self.system_commands.index(cmd)
                del self.system_commands[ic]
            except __HOLE__:
                pass
        else:
            self.commands = [oldcmd for oldcmd in self.commands if oldcmd != cmd]
dataset/ETHPy150Open evennia/evennia/evennia/commands/cmdset.py/CmdSet.remove