code: def get_cache_files_pascal_voc(
      data_dir: str, cache_dir: str
  ) -> cache_files.TFRecordCacheFiles:
      """Gets an object of CacheFiles using a PASCAL VOC formatted dataset.
  
      Args:
        data_dir: Folder path of the pascal voc dataset.
        cache_dir: Folder path of the cache location. When cache_dir is None, a
          temporary folder will be created and will not be removed automatically
          after training which makes it can be used later.
  
      Returns:
        An object of CacheFiles class.
      """
      hasher = hashlib.md5()
      hasher.update(_get_dir_basename(data_dir).encode("utf-8"))
      annotation_files = tf.io.gfile.glob(
          os.path.join(data_dir, "Annotations") + r"/*.xml"
      )
      annotation_filenames = [
          os.path.basename(ann_file) for ann_file in annotation_files
      ]
      hasher.update(" ".join(annotation_filenames).encode("utf-8"))
      num_examples = len(annotation_filenames)
      num_shards = min(math.ceil(num_examples / 100), 10)
      hasher.update(str(num_shards).encode("utf-8"))
      cache_prefix_filename = hasher.hexdigest()
  
      return _get_cache_files(
          cache_dir, cache_prefix_filename, num_shards
      )
  
imports: import abc
  import collections
  import hashlib
  import json
  import math
  import os
  import tempfile
  from typing import Any, Dict, List, Mapping, Optional
  import xml.etree.ElementTree
  import tensorflow
  from mediapipe.model_maker.python.core.data import cache_files
  from official.vision.data import tfrecord_lib
label_desc: Use image node_id 6 for calling a global function with example usage: get_cache_files_pascal_voc(data_dir, cache_dir) and returns: _get_cache_files