
    Given a fleet of public transit vehicles with their predicted maintenance data, determine which vehicle requires immediate attention by finding the vehicle ID with the earliest predicted failure time. Each vehicle's data is represented as a pair containing its ID and predicted hours until failure, and you need to identify the ID of the vehicle that is closest to requiring maintenance.
    

    
from operator import itemgetter

def index_minimum(test_list):
    """
    Given a fleet of public transit vehicles with their predicted maintenance data, determine which vehicle requires immediate attention by finding the vehicle ID with the earliest predicted failure time. Each vehicle's data is represented as a pair containing its ID and predicted hours until failure, and you need to identify the ID of the vehicle that is closest to requiring maintenance.
    

    """
from operator import itemgetter

def index_minimum(test_list):
    """
    Given a fleet of public transit vehicles with their predicted maintenance data, determine which vehicle requires immediate attention by finding the vehicle ID with the earliest predicted failure time. Each vehicle's data is represented as a pair containing its ID and predicted hours until failure, and you need to identify the ID of the vehicle that is closest to requiring maintenance.
    

    """
    res = min(test_list, key=itemgetter(1))[0]
    return res