code: def convert_bbox(
      bbox: Sequence[Union[int, float]],
      notation: str,
      image_width: Union[int, float, None] = None,
      image_height: Union[int, float, None] = None,
      _strict: bool = True,  # pylint: disable=invalid-name
  ) -> np.ndarray:
      """Convert bbox to the required format.
  
      Parameters
      ----------
      bbox : Sequence[Sequence[Union[int, float]]]
          bbox to transform
      notation : str
          bboxes format notation
      image_width : Union[int, float, None], default: None
          width of the image to denormalize bbox coordinates
      image_height : Union[int, float, None], default: None
          height of the image to denormalize bbox coordinates
  
      Returns
      -------
      np.ndarray
          bbox transformed to the required by deepchecks format
      """
      if len(bbox) < 5:
          raise ValueError("incorrect bbox")  # TODO: better message
  
      (
          are_coordinates_normalized,
          notation_tokens,
      ) = verify_bbox_format_notation(notation)
  
      if are_coordinates_normalized is True and (
          image_height is None or image_width is None
      ):
          raise ValueError(
              "bbox format notation indicates that coordinates of the bbox "
              "are normalized but 'image_height' and 'image_width' parameters "
              "were not provided. Please pass image height and width parameters "
              "or remove 'n' element from the format notation."
          )
  
      if are_coordinates_normalized is False and (
          image_height is not None or image_width is not None
      ):
          if _strict is True:
              raise ValueError(
                  "bbox format notation indicates that coordinates of the bbox "
                  "are not normalized but 'image_height' and 'image_width' were provided. "
                  "Those parameters are redundant in the case when bbox coordinates are not "
                  "normalized. Please remove those parameters or add 'n' element to the format "
                  "notation to indicate that coordinates are indeed normalized."
              )
          else:
              image_height = None
              image_width = None
  
      return _convert_bbox(
          bbox,
          notation_tokens,
          image_width,
          image_height,
      )
  
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 3 for calling a global function with example usage: convert_bbox(bbox, notation, image_width, image_height, _strict) and returns: _convert_bbox