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 (obj): h5py file containing bounding box information.

    Returns:
        (dict): Label and bounding box information including left, top, width, and height.

    """
    meta_data = {'height': [], 'label': [], 'left': [], 'top': [], 'width': []}

    def get_attrs(name, obj):
        vals = []
        if len(obj) == 1:
            vals.append(int(obj[()]))
        else:
            for h5_ref in obj[:, 0]:
                vals.append(int(hdf5_data[h5_ref][:]))

        meta_data[name] = vals

    box = hdf5_data['/digitStruct/bbox'][index, 0]
    hdf5_data[box].visititems(get_attrs)
    return meta_data