class_docstr: Creates temporary XML files from masks for testing. Intended to be used
  as a context so that the XML files are automatically deleted when the
  execution goes out of scope.
  
  Example:
  
      >>> with BBFromMasks(root="/tmp/datasets/MVTec", datast_name="MVTec"):
      >>>     tests_case()
  
  Args:
      root (str, optional): Path to the dataset location. Defaults to "datasets/MVTec".
      dataset_name (str, optional): Name of the dataset to write to the XML file. Defaults to "MVTec".
docstr: Cleans up generated XML files.
docstr_tok: ["Cleans","up","generated","XML","files","."]
code: def __exit__(self, _exc_type, _exc_value, _exc_traceback):
      """Cleans up generated XML files."""
      for file in self.generated_xml_files:
          os.remove(file)
  
file_path: anomalib/tests/helpers/detection.py
imports: import os
  import xml.etree.ElementTree
  from glob import glob
  from typing import List, Tuple
  import cv2
  import numpy
label_desc: Use image node_id 3 for calling the BBFromMasks obj's underlying member method code with example usage: obj.__exit__(_exc_type, _exc_value, _exc_traceback) without return types