#NEWLINE# def get( self , cmd ) : #NEWLINE# #INDENT# '\n        Get a command from the cmdset. This is mostly useful to\n        check if the command is part of this cmdset or not.\n\n        Args:\n            cmd (Command or str): Either the Command object or its key.\n\n        Returns:\n            cmd (Command): The first matching Command in the set.\n\n        ' #NEWLINE# cmd = self . _instantiate ( cmd ) #NEWLINE# for thiscmd in self . commands : #NEWLINE# #INDENT# if ( thiscmd == cmd ) : #NEWLINE# #INDENT# return thiscmd