code: def count_tokens(x, encoding_name="cl100k_base"):
      try:
          import tiktoken
  
          encoding = tiktoken.get_encoding(encoding_name)
          return len(encoding.encode(x, disallowed_special=()))
      except ImportError:
          return 0
  
imports: import ast
  import os
  import time
  import uuid
  from collections import deque
  from log import logger
label_desc: Use image node_id 3 for calling a global function with example usage: count_tokens(x, encoding_name) and returns: len, int