def create_question(self, question, type=None, **kwargs):
        """
        Returns a Question of specified type.

        :param type: The type of the question
        :type type: str

        :rtype: mixed
        """
        if not type:
            return Question(question, **kwargs)

        if type == 'choice':
            return ChoiceQuestion(question, **kwargs)

        if type == 'confirmation':
            return ConfirmationQuestion(question, **kwargs)
dataset/ETHPy150Open sdispater/cleo/cleo/commands/command.py/Command.create_question/original