code: def _transform_within_tags(
      text: str, scale_factor: float, tokenizer
  ) -> List[int]:
      """
      Given a bounding box of the fashion <box>1, 2, 3, 4</box> | <point>1, 2</point> This function is responsible for
      converting 1, 2, 3, 4 into tokens of 1 2 3 4 without any commas.
      """
      # Convert the text into a list of strings.
      num_int_strs = text.split(",")
      if len(num_int_strs) == 2:
          # If there are any open or close tags, remove them.
          token_space_open_string = tokenizer.vocab[
              TOKEN_POINT_OPEN_STRING
          ]
          token_space_close_string = tokenizer.vocab[
              TOKEN_POINT_CLOSE_STRING
          ]
      else:
          token_space_open_string = tokenizer.vocab[
              TOKEN_BBOX_OPEN_STRING
          ]
          token_space_close_string = tokenizer.vocab[
              TOKEN_BBOX_CLOSE_STRING
          ]
  
      # Remove all spaces from num_ints
      num_ints = [float(num.strip()) for num in num_int_strs]
      # scale to transformed image siz
      if len(num_ints) == 2:
          num_ints_translated = scale_point_to_transformed_image(
              x=num_ints[0], y=num_ints[1], scale_factor=scale_factor
          )
      elif len(num_ints) == 4:
          num_ints_translated = scale_bbox_to_transformed_image(
              top=num_ints[0],
              left=num_ints[1],
              bottom=num_ints[2],
              right=num_ints[3],
              scale_factor=scale_factor,
          )
      else:
          raise ValueError(f"Invalid number of ints: {len(num_ints)}")
      # Tokenize the text, skipping the
      tokens = [
          tokenizer.vocab[str(num)] for num in num_ints_translated
      ]
      return (
          [token_space_open_string]
          + tokens
          + [token_space_close_string]
      )
  
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 6 for calling a global function with example usage: _transform_within_tags(text, scale_factor, tokenizer) and returns: unknown