code: def _transform_coordinates_and_tokenize(
      prompt: str, scale_factor: float, tokenizer
  ) -> List[int]:
      """
      This function transforms the prompt in the following fashion:
      - <box> <point> and </box> </point> to their respective token mappings
      - extract the coordinates from the tag
      - transform the coordinates into the transformed image space
      - return the prompt tokens with the transformed coordinates and new tags
  
      Bounding boxes and points MUST be in the following format: <box>y1, x1, y2, x2</box> <point>x, y</point> The spaces
      and punctuation added above are NOT optional.
      """
      # Make a namedtuple that stores "text" and "is_bbox"
  
      # We want to do the following: Tokenize the code normally -> when we see a point or box, tokenize using the tokenize_within_tag function
      # When point or box close tag, continue tokenizing normally
      # First, we replace the point and box tags with their respective tokens
      prompt = _replace_string_repr_with_token_tags(prompt)
      # Tokenize the prompt
      # Convert prompt into a list split
      prompt_text_list = _segment_prompt_into_text_token_conversions(
          prompt
      )
      transformed_prompt_tokens: List[int] = []
      for elem in prompt_text_list:
          if elem[1]:
              # This is a location, we need to tokenize it
              within_tag_tokenized = _transform_within_tags(
                  elem[0], scale_factor, tokenizer
              )
              # Surround the text with the open and close tags
              transformed_prompt_tokens.extend(within_tag_tokenized)
          else:
              transformed_prompt_tokens.extend(
                  tokenizer(elem[0], add_special_tokens=False).input_ids
              )
      return transformed_prompt_tokens
  
imports: import re
  from typing import Dict, List, Optional, Tuple, Union
  import numpy
  from ...processing_utils import ProcessorMixin
  from ...tokenization_utils_base import PaddingStrategy, TruncationStrategy
  from ...utils import TensorType, is_torch_available, logging, requires_backends
label_desc: Use image node_id 5 for calling a global function with example usage: _transform_coordinates_and_tokenize(prompt, scale_factor, tokenizer) and returns: transformed_prompt_tokens