(self, indices: Union[int, List[int]])
Converts token indices to tokens according to the vocabulary

        Args:
            indices (Union[int, List[int]]): a source token index or token indices to be converted
        Returns:
            Union[str, List[str]]: a token or a list of tokens according to the vocabulary
Converts token indices to tokens according to the vocabulary
Converts token indices to tokens according to the vocabulary
def to_tokens(self, indices: Union[int, List[int]]) -> Union[str, List[str]]:
        """Converts token indices to tokens according to the vocabulary

        Args:
            indices (Union[int, List[int]]): a source token index or token indices to be converted
        Returns:
            Union[str, List[str]]: a token or a list of tokens according to the vocabulary
        """
        if isinstance(indices, list):
            return [self._idx_to_token[idx] for idx in indices]
        else:
            return self._idx_to_token[indices]
def to_tokens ( self , indices : Union [ int , List [ int ] ] ) -> Union [ str , List [ str ] ] : if isinstance ( indices , list ) : return [ self . _idx_to_token [ idx ] for idx in indices ] else : return self . _idx_to_token [ indices ]