class_docstr: Result of prompt construction.
code: def text(self) -> str:
      # Text for the prompt, might be truncated
      if self.truncated_text:
          return self.truncated_text
  
      # Construct non-truncated input
      blocks: List[str] = (
          ([self.instructions_block] if self.instructions_block else [])
          + self.train_instance_blocks
          + [self.eval_instance_block]
      )
      non_truncated_text: str = self.instance_prefix.join(blocks)
  
      # Note: this could be implemented via substitutions.
      if self.global_prefix:
          non_truncated_text = (
              f"{self.global_prefix} {non_truncated_text}"
          )
  
      # Perform substitutions (e.g., add "<br>" before "\n")
      for subst in self.substitutions:
          non_truncated_text = re.sub(
              subst.source, subst.target, non_truncated_text
          )
  
      return non_truncated_text
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/adaptation/prompt.py
imports: import re
  from dataclasses import dataclass
  from typing import List, Optional
  from .adapter_spec import Substitution
label_desc: Use image node_id 1 for calling the Prompt obj's underlying member method code with example usage: obj.text() and returns: non_truncated_text, self