code: def test_xml_to_csv():
      path = os.path.dirname(__file__)
      input_folder = os.path.join(path, "static")
      output_path = os.path.join(path, "static/labels.csv")
  
      df = xml_to_csv(input_folder, output_path)
      csv = pd.read_csv(output_path)
  
      assert len(csv) == 2
      assert len(df) == 2
      assert csv.loc[0, "filename"] == "image.jpg"
      assert df.loc[1, "class"] == "start_gate"
      assert csv.loc[0, "width"] == 1720
      assert df.loc[1, "height"] == 1080
      assert csv.loc[0, "ymax"] == 784
      assert df.loc[1, "xmin"] == 1
  
      os.remove(output_path)
  
      xml_to_csv(input_folder)
      assert not os.path.isfile(output_path)
  
file_path: detecto/detecto/tests/test_utils.py
imports: import os
  import pandas
  import pytest
  import torch
  import torchvision
  from .helpers import get_image
  from detecto.utils import *
  from detecto.utils import _is_iterable
label_desc: Use image node_id 8 for calling a global function with example usage: test_xml_to_csv() without return types