class_docstr: A text with a rationale explanation.
docstr: Returns the text covering only the rationale.
  
  Args:
    mask_token: Token to use for all the tokens not in the rationale.
  Returns: A string representing the source text with everything but rationale
    masked.
docstr_tok: ["Returns","the","text","covering","only","the","rationale",".","Args",":","mask_token",":","Token","to","use","for","all","the","tokens","not","in","the","rationale",".","Returns",":","A","string","representing","the","source","text","with","everything","but","rationale","masked","."]
code: def get_rationale_text(self, mask_token: Optional[str] = None) -> str:
      """Returns the text covering only the rationale.
  
      Args:
        mask_token: Token to use for all the tokens not in the rationale.
      Returns: A string representing the source text with everything but rationale
        masked.
      """
      result = []
      for i, token in enumerate(self.tokens):
          if i in self.top_k_ids_set:
              result.append(token)
          elif mask_token:
              result.append(mask_token)
      return " ".join(result)
  
file_path: lit/lit_nlp/components/citrus/helpers.py
imports: from collections.abc import Sequence
  import math
  from typing import Any, Optional
  import attr
  import numpy
label_desc: Use image node_id 2 for calling the TextRationale obj's underlying member method code with example usage: obj.get_rationale_text(mask_token) and returns: str