class_docstr: Abstract base class for highlighters.
docstr: Highlight a str or Text instance.
  
  Args:
      text (Union[str, ~Text]): Text to highlight.
  
  Raises:
      TypeError: If not called with text or str.
  
  Returns:
      Text: A test instance with highlighting applied.
docstr_tok: ["Highlight","a","str","or","Text","instance",".","Args",":","text","(","Union","[","str",",","~Text","]",")",":","Text","to","highlight",".","Raises",":","TypeError",":","If","not","called","with","text","or","str",".","Returns",":","Text",":","A","test","instance","with","highlighting","applied","."]
code: def __call__(self, text: Union[str, Text]) -> Text:
      """Highlight a str or Text instance.
  
      Args:
          text (Union[str, ~Text]): Text to highlight.
  
      Raises:
          TypeError: If not called with text or str.
  
      Returns:
          Text: A test instance with highlighting applied.
      """
      if isinstance(text, str):
          highlight_text = Text(text)
      elif isinstance(text, Text):
          highlight_text = text.copy()
      else:
          raise TypeError(
              f"str or Text instance required, not {text!r}"
          )
      self.highlight(highlight_text)
      return highlight_text
  
imports: import re
  from abc import ABC, abstractmethod
  from typing import List, Union
  from .text import Span, Text
label_desc: Use image node_id 1 for calling the Highlighter obj's underlying member method code with example usage: obj.__call__(text) and returns: highlight_text