docstr: Get image id from its path.
  
  Parameters
  ----------
  image_path
      Image path.
  
  Returns
  -------
  Image ID.
code: def get_image_id_from_path(self, image_path: str):
      """
      Get image id from its path.
  
      Parameters
      ----------
      image_path
          Image path.
  
      Returns
      -------
      Image ID.
      """
      return self.image_filename_to_id[get_image_filename(image_path)]
  
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 2 for calling the COCODataset obj's underlying member method code with example usage: obj.get_image_id_from_path(image_path) and returns: self