def load_labels(cache_dir: Union[(Path, str)]) -> Tuple[(Tuple[(str, ...)], np.ndarray, List[str], np.ndarray)]:
    '\n    prepare all the labels\n    '
    filename_io = download_url('https://raw.githubusercontent.com/csailvision/places365/master/IO_places365.txt', cache_dir)
    with open(filename_io) as f:
        lines = f.readlines()
        labels_IO = []
        for line in lines:
            items = line.rstrip().split()
            labels_IO.append((int(items[(- 1)]) - 1))
    labels_IO = np.array(labels_IO)
    filename_category = download_url('https://raw.githubusercontent.com/csailvision/places365/master/categories_places365.txt', cache_dir)
    _classes = list()
    with open(filename_category) as class_file:
        for line in class_file:
            _classes.append(line.strip().split(' ')[0][3:])
    classes = tuple(_classes)
    filename_attribute = download_url('https://raw.githubusercontent.com/csailvision/places365/master/labels_sunattribute.txt', cache_dir)
    with open(filename_attribute) as f:
        lines = f.readlines()
        labels_attribute = [item.rstrip() for item in lines]
    filename_W = download_url('http://places2.csail.mit.edu/models_places365/W_sceneattribute_wideresnet18.npy', cache_dir)
    W_attribute = np.load(filename_W)
    return (classes, labels_IO, labels_attribute, W_attribute)
prepare all the labels
def load_labels(cache_dir: Union[(Path, str)]) -> Tuple[(Tuple[(str, ...)], np.ndarray, List[str], np.ndarray)]:
    '\n    \n    '
    filename_io = download_url('https://raw.githubusercontent.com/csailvision/places365/master/IO_places365.txt', cache_dir)
    with open(filename_io) as f:
        lines = f.readlines()
        labels_IO = []
        for line in lines:
            items = line.rstrip().split()
            labels_IO.append((int(items[(- 1)]) - 1))
    labels_IO = np.array(labels_IO)
    filename_category = download_url('https://raw.githubusercontent.com/csailvision/places365/master/categories_places365.txt', cache_dir)
    _classes = list()
    with open(filename_category) as class_file:
        for line in class_file:
            _classes.append(line.strip().split(' ')[0][3:])
    classes = tuple(_classes)
    filename_attribute = download_url('https://raw.githubusercontent.com/csailvision/places365/master/labels_sunattribute.txt', cache_dir)
    with open(filename_attribute) as f:
        lines = f.readlines()
        labels_attribute = [item.rstrip() for item in lines]
    filename_W = download_url('http://places2.csail.mit.edu/models_places365/W_sceneattribute_wideresnet18.npy', cache_dir)
    W_attribute = np.load(filename_W)
    return (classes, labels_IO, labels_attribute, W_attribute)