code: def calculage_img_tokens(
      width,
      height,
      mode: Literal["low", "high", "auto"] = "auto",
      base_tokens: int = 85,  # openai default - https://openai.com/pricing
  ):
      if mode == "low":
          return base_tokens
      elif mode == "high" or mode == "auto":
          resized_width, resized_height = resize_image_high_res(
              width=width, height=height
          )
          tiles_needed_high_res = calculate_tiles_needed(
              resized_width, resized_height
          )
          tile_tokens = (base_tokens * 2) * tiles_needed_high_res
          total_tokens = base_tokens + tile_tokens
          return total_tokens
  
imports: from typing import Literal
label_desc: Use image node_id 1 for calling a global function with example usage: calculage_img_tokens(width, height, mode, base_tokens) and returns: base_tokens, total_tokens