code: protected function getQuestion($questionName, $defaultValue = null, $validator = null)
      {
          $questionName = $defaultValue
              ? '<info>' . $questionName . '</info> [<comment>' . $defaultValue . '</comment>]: '
              : '<info>' . $questionName . '</info>: ';
  
          $question = new Question($questionName, $defaultValue);
          if ($validator !== null) {
              $question->setValidator($validator);
          }
  
          return $question;
      }
docs: Instantiates and returns a choice question.
  
  @param string $questionName
  @param string $defaultValue
  @param callable $validator
  
  @return \Symfony\Component\Console\Question\Question