class_docstr: Component for converting strings to strings with reversed token positions
  
  Args:
      tokenized: The parameter is only needed to reverse tokenized strings.
docstr: Recursively search for strings in a list and convert them to strings with reversed token positions
  
  Args:
      batch: a string or a list containing strings
  
  Returns:
      the same structure where all strings tokens are reversed
code: def __call__(
      self, batch: Union[str, list, tuple]
  ) -> StrTokenReverserInfo:
      """Recursively search for strings in a list and convert them to strings with reversed token positions
  
      Args:
          batch: a string or a list containing strings
  
      Returns:
          the same structure where all strings tokens are reversed
      """
      if isinstance(batch, (list, tuple)):
          batch = batch.copy()
  
      if self.tokenized:
          if isinstance(batch, (list, tuple)):
              if isinstance(batch[-1], str):
                  return self._reverse_tokens(batch)
              else:
                  return [self(line) for line in batch]
          raise RuntimeError(
              f"The objects passed to the reverser are not list or tuple! "
              f" But they are {type(batch)}."
              f" If you want to passed str type directly use option tokenized = False"
          )
      else:
          if isinstance(batch, (list, tuple)):
              return [self(line) for line in batch]
          else:
              return self._reverse_str(batch)
  
file_path: DeepPavlov/deeppavlov/models/preprocessors/str_token_reverser.py
imports: from typing import List, Union
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.models.component import Component
label_desc: Use image node_id 4 for calling the StrTokenReverser obj's underlying member method code with example usage: obj.__call__(batch) and returns: unknown, self, self, unknown