def get_bbox(index, hdf5_data):
    """Retrieves the bounding box from hdf5 data for a specific index.
    
    Args:
        index (int): index of image.
        hdf5_data (h5py file): h5py file containing bounding box information.
    
    Returns:
        dictionnary: label, left, top, width and height values for the bounding box.
    """
    attrs = {}
    item = hdf5_data['digitStruct']['bbox'][index].item()
    for key in ['label', 'left', 'top', 'width', 'height']:
        attr = hdf5_data[item][key]
        values = [int(hdf5_data[attr.value[i].item()].value[0][0])
                  for i in range(len(attr))] if len(attr) > 1 else [int(attr.value[0][0])]
        attrs[key] = values
    return attrs