class_docstr: Dataset used to parallelize the transformation of the dataset via a DataLoader
class_docstr_tok: ["Dataset","used","to","parallelize","the","transformation","of","the","dataset","via","a","DataLoader"]
docstr: Read the annotation file associated to an image and extract the distance
  to the closest vehicle in the image or "-inf" if no vehicle is found
docstr_tok: ["Read","the","annotation","file","associated","to","an","image","and","extract","the","distance","to","the","closest","vehicle","in","the","image","or","``","-inf","''","if","no","vehicle","is","found"]
code: def _get_closest_vehicle_distance(self, annotation_name: str):
      """
      Read the annotation file associated to an image and extract the distance
      to the closest vehicle in the image or "-inf" if no vehicle is found
      """
      vehicle_types = {"Car", "Van", "Truck"}
      with open(
          os.path.join(self.annotation_folder, annotation_name), "r"
      ) as annotations:
          distances = []
          for annotation in annotations:
              annotation = annotation.split()
              object_type = annotation[0]
              object_dist = float(annotation[13])
              if object_type in vehicle_types:
                  distances.append(object_dist)
          return min(distances, default=-math.inf)
  
file_path: vissl/extra_scripts/datasets/create_kitti_dist_data_files.py
imports: import argparse
  import bisect
  import math
  import os
  import shutil
  from typing import Set
  import numpy
  from torch.utils.data import DataLoader
  from tqdm import tqdm
  from vissl.utils.download import download_and_extract_archive
label_desc: Use image node_id 5 for calling the KITTIDistance obj's underlying member method code with example usage: obj._get_closest_vehicle_distance(annotation_name) and returns: min