def _instantiate(self, cmd):
        """
        checks so that object is an instantiated command and not, say
        a cmdclass. If it is, instantiate it.  Other types, like
        strings, are passed through.

        Args:
            cmd (any): Entity to analyze.

        Returns:
            result (any): An instantiated Command or the input unmodified.

        """
        try:
            return cmd()
        except __HOLE__:
            return cmd
dataset/ETHPy150Open evennia/evennia/evennia/commands/cmdset.py/CmdSet._instantiate