docstr: Truncates text from the right to fit within the given model's context window
  minus the expected completion length (defaults to 0).
docstr_tok: ["Truncates","text","from","the","right","to","fit","within","the","given","model","'s","context","window","minus","the","expected","completion","length","(","defaults","to","0",")","."]
code: def truncate_from_right(
      self, text: str, expected_completion_token_length: int = 0
  ) -> str:
      """
      Truncates text from the right to fit within the given model's context window
      minus the expected completion length (defaults to 0).
      """
      pass
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/window_services/window_service.py
imports: from abc import ABC, abstractmethod
  from typing import List, Optional
  from dataclasses import dataclass
  from helm.common.tokenization_request import TokenizationToken
label_desc: Use image node_id 11 for calling the WindowService obj's underlying member method code with example usage: obj.truncate_from_right(text, expected_completion_token_length) without return types