def prettify(self, tokens: List[str], heads: List[int], deps: List[str]) -> Union[List[str], str]:
        """Prettifies output of dependency parser.
        Args:
            tokens: tokenized source sentence
            heads: list of head positions, the output of the parser
            deps: list of head positions, the output of the parser
        Returns:
            the prettified output of the parser
        """
        answer = []
        for i, (word, head, dep) in enumerate(zip(tokens, heads, deps)):
            answer.append(self.format_string.format(i + 1, word, head, dep))
        if self.return_string:
            answer = self.begin + self.sep.join(answer) + self.end
        return answer
Prettifies output of dependency parser.
        Args:
            tokens: tokenized source sentence
            heads: list of head positions, the output of the parser
            deps: list of head positions, the output of the parser
        Returns:
            the prettified output of the parser
        
deeppavlov/models/morpho_syntax_parser/syntax_parsing.py