#NEWLINE# def _instantiate( self , cmd ) : #NEWLINE# #INDENT# '\n        checks so that object is an instantiated command and not, say\n        a cmdclass. If it is, instantiate it.  Other types, like\n        strings, are passed through.\n\n        Args:\n            cmd (any): Entity to analyze.\n\n        Returns:\n            result (any): An instantiated Command or the input unmodified.\n\n        ' #NEWLINE# try : #NEWLINE# #INDENT# return cmd ( ) #NEWLINE# #UNINDENT# except TypeError : #NEWLINE# #INDENT# return cmd