code: def _get_image_info(image_path: str):
      """
      Get the image width and height info
      Parameters
      ----------
      image_path
          str representing the path to the image
      Returns
      -------
          dict containing image info. None if cannot open image
      """
      info_dict = {}
      try:
          with PIL.Image.open(image_path) as im:
              height, width = im.size
              info_dict["height"] = height
              info_dict["width"] = width
          return info_dict
      except Exception as err:
          warnings.warn(f"Skip image {image_path} due to {err}")
          return None
  
imports: import json
  import logging
  import os
  import warnings
  from pathlib import Path
  from typing import Dict, Iterable, List, Optional, Union
  import defusedxml.ElementTree
  import numpy
  import pandas
  import PIL
  from torchmetrics.detection.mean_ap import MeanAveragePrecision
  from ..constants import BBOX, LABEL, MAP, MAP_50, MAP_75, MAP_LARGE, MAP_MEDIUM, MAP_SMALL, MAR_1, MAR_10, MAR_100, MAR_LARGE, MAR_MEDIUM, MAR_SMALL, MEAN_AVERAGE_PRECISION
  from .download import download, is_url
label_desc: Use image node_id 1 for calling a global function with example usage: _get_image_info(image_path) and returns: info_dict, None