def METHOD_NAME(self, example: InputExample):
    # switch text_a and text_b to get the correct order
    text_a = example.text_a
    text_b = example.text_b.rstrip(string.punctuation)
    if self.pattern_id == 0:
        parts_a, parts_b = [None, '"',
                            self.shortenable(text_b), '" ?'], [
                                None, [self.mask], ',', None, ' "',
                                self.shortenable(text_a), '"'
                            ]
    elif self.pattern_id == 1:
        parts_a, parts_b = [None, self.shortenable(text_b), '?'], [
            None, [self.mask], ',', None,
            self.shortenable(" " + text_a)
        ]
    elif self.pattern_id == 2:
        parts_a, parts_b = [
            None,
            self.shortenable(text_a), None, ' question:',
            self.shortenable(" " + text_b), ' True or False?', None,
            ' answer:', [self.mask]
        ], []
    else:
        raise NotImplementedError(self.pattern_id)
    parts_a, parts_b = self.replace_prompt_tokens(parts_a, parts_b)
    return parts_a, parts_b