code: def from_dict(data: dict) -> pd.DataFrame:
      """
      Construct a dataframe (dummy) from a data dictionary, with the form {"image": ["img1.jpg", "img2.jpg", ...]}
      Parameters
      ----------
      data
          Dict containing the image paths
      Returns
      -------
      a pandas DataFrame with columns "image", "rois", and "label".
      """
      # TODO: Remove this function after refactoring
      d = {"image": [], "rois": [], "label": []}
  
      for image in data["image"]:
          d["image"].append(image)
          # Dummy rois
          d["rois"].append([[-1, -1, -1, -1, 0]])
          d["label"].append([[-1, -1, -1, -1, 0]])
      df = pd.DataFrame(d)
      return df.sort_values("image").reset_index(drop=True)
  
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 8 for calling a global function with example usage: from_dict(data) and returns: df