def __call__(self, batch: List[Union[str, List[str]]]) -> List[Union[List[str], str]]:
if isinstance(batch[<NUM_LIT:0>], str):<EOL><INDENT>return [self.tokenizer.tokenize(line, escape=self.escape) for line in batch]<EOL><DEDENT>else:<EOL><INDENT>return [self.detokenizer.detokenize(line, return_str=True, unescape=self.escape)<EOL>for line in batch]<EOL><DEDENT>
Tokenize given batch of strings or detokenize given batch of lists of tokens

        Args:
            batch: list of text samples or list of lists of tokens

        Returns:
            list of lists of tokens or list of text samples