code: def verify_bbox_format_notation(
      notation: str,
  ) -> Tuple[bool, List[str]]:
      """Verify and tokenize bbox format notation.
  
      Parameters
      ----------
      notation : str
          format notation to verify and to tokenize
  
      Returns
      -------
      Tuple[
          bool,
          List[Literal['label', 'score', 'width', 'height', 'xmin', 'ymin', 'xmax', 'ymax', 'xcenter', 'ycenter']]
      ]
          first item indicates whether coordinates are normalized or not,
          second represents format of the bbox
      """
      tokens = []
      are_coordinates_normalized = False
      current = notation = notation.strip().lower()
      current_pos = 0
  
      while current:
          if current.startswith("l"):
              tokens.append("l")
              current = current[1:]
              current_pos = current_pos + 1
          elif current.startswith("s"):
              tokens.append("s")
              current = current[1:]
              current_pos = current_pos + 1
          elif current.startswith("wh"):
              tokens.append("wh")
              current = current[2:]
              current_pos = current_pos + 2
          elif current.startswith("xy"):
              tokens.append("xy")
              current = current[2:]
              current_pos = current_pos + 2
          elif current.startswith("cxcy"):
              tokens.append("cxcy")
              current = current[4:]
              current_pos = current_pos + 4
          elif current.startswith("n") and current_pos == 0:
              are_coordinates_normalized = True
              current = current[1:]
              current_pos = current_pos + 1
          elif current.startswith("n") and (current_pos + 1) == len(
              notation
          ):
              are_coordinates_normalized = True
              current_pos = current_pos + 1
              break
          else:
              raise ValueError(
                  f"Wrong bbox format notation - {notation}. "
                  f"Incorrect or unknown sequence of charecters starting from position {current_pos} "
                  f"(sequence: ...{notation[current_pos:]}"
              )
  
      received_combination = Counter(tokens)
      allowed_combinations = [
          {"l": 1, "xy": 2},
          {"l": 1, "xy": 1, "wh": 1},
          {"l": 1, "cxcy": 1, "wh": 1},
      ]
      # All allowed combinations are also allowed with or without score to support both label and prediction
      allowed_combinations += [
          {**c, "s": 1} for c in allowed_combinations
      ]
  
      if (
          sum(c == received_combination for c in allowed_combinations)
          != 1
      ):
          raise ValueError(
              f"Incorrect bbox format notation - {notation}.\n"
              "Only next combinations of elements are allowed:\n"
              "+ lxyxy (label, upper-left corner, bottom-right corner)\n"
              "+ lxywh (label, upper-left corner, bbox width and height)\n"
              "+ lcxcywh (label, bbox center, bbox width and height)\n"
              "+ lcxcywhn (label, normalized bbox center, bbox width and height)\n\n"
              ""
              "Note:\n"
              "- notation elements (l, xy, cxcy, wh) can be placed in any order "
              "but only above combinations of elements are allowed\n"
              '- "n" at the begining or at the ned of the notation indicates '
              "normalized coordinates\n"
          )
  
      normalized_tokens = []
  
      for t in tokens:
          if t == "l":
              normalized_tokens.append("label")
          elif t == "s":
              normalized_tokens.append("score")
          elif t == "wh":
              normalized_tokens.extend(("width", "height"))
          elif t == "cxcy":
              normalized_tokens.extend(("xcenter", "ycenter"))
          elif t == "xy":
              if (
                  "xmin" not in normalized_tokens
                  and "ymin" not in normalized_tokens
              ):
                  normalized_tokens.extend(("xmin", "ymin"))
              else:
                  normalized_tokens.extend(("xmax", "ymax"))
          else:
              raise RuntimeError(
                  "Internal Error! Unreachable part of code reached"
              )
  
      return are_coordinates_normalized, normalized_tokens
  
file_path: deepchecks/deepchecks/vision/utils/detection_formatters.py
imports: from collections import Counter
  from typing import Iterable, List, Sequence, Tuple, Union
  import numpy
  from PIL.Image import Image
  from deepchecks.vision.vision_data.utils import is_torch_object
label_desc: Use image node_id 1 for calling a global function with example usage: verify_bbox_format_notation(notation) and returns: are_coordinates_normalized,  normalized_tokens