class_docstr: Tokenizes by making a request to the proxy server with REST endpoint: `/api/tokenize`.
code: def fits_within_context_window(
      self, text: str, expected_completion_token_length: int = 0
  ) -> bool:
      return (
          len(text) <= AI21WindowService.MAX_CHARACTER_LENGTH
          and self.get_num_tokens(text)
          + expected_completion_token_length
          <= self.max_request_length
      )
  
imports: import re
  from typing import List, Optional, Tuple
  from urllib.parse import unquote
  from helm.common.tokenization_request import TokenizationRequest, TokenizationRequestResult, TokenizationToken, TextRange
  from .window_service import WindowService, EncodeResult
  from .tokenizer_service import TokenizerService
  from .gpt2_window_service import GPT2WindowService
label_desc: Use image node_id 11 for calling the AI21WindowService obj's underlying member method code with example usage: obj.fits_within_context_window(text, expected_completion_token_length) and returns: unknown