'Get a command from the cmdset. This is mostly useful to
check if the command is part of this cmdset or not.
Args:
cmd (Command or str): Either the Command object or its key.
Returns:
cmd (Command): The first matching Command in the set.'

def get(self, cmd):

    cmd = self._instantiate(cmd)
    for thiscmd in self.commands:
        if (thiscmd == cmd):
            return thiscmd
    return None
