class_docstr: Tokenizes by making a request to the proxy server with REST endpoint: `/api/tokenize`.
docstr: Tokenizes the text using the GPT-2 tokenizer and returns the number of tokens.
docstr_tok: ["Tokenizes","the","text","using","the","GPT-2","tokenizer","and","returns","the","number","of","tokens","."]
code: def get_num_tokens(self, text: str) -> int:
      """Tokenizes the text using the GPT-2 tokenizer and returns the number of tokens."""
      return len(self.tokenize(text))
  
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 10 for calling the AI21WindowService obj's underlying member method code with example usage: obj.get_num_tokens(text) and returns: len