class_docstr: CLEAR Image Dataset (base class for CLEARImage)
code: def _load_metadata_new(self) -> bool:
      if not super(_CLEARImage, self)._load_metadata_new():
          print("CLEAR has not yet been downloaded")
          return False
  
      self.paths = []
      self.targets = []
      self._paths_and_targets = []
      splits = (
          ["test", "train"] if self.split == "all" else [self.split]
      )
      for split in splits:
          train_folder_path = self.root / split
          if not train_folder_path.exists():
              print(f"{train_folder_path} does not exist. ")
              return False
  
          self.labeled_metadata = _load_json(
              train_folder_path / "labeled_metadata.json"
          )
  
          samples = []
          for bucket, data in self.labeled_metadata.items():
              for class_idx, class_name in enumerate(self.class_names):
                  metadata_path = data[class_name]
                  metadata_path = train_folder_path / metadata_path
                  if not metadata_path.exists():
                      print(f"{metadata_path} does not exist. ")
                      return False
                  metadata = _load_json(metadata_path)
                  for v in metadata.values():
                      f_path = os.path.join(split, v["IMG_PATH"])
                      samples.append((f_path, class_idx))
              if self.split == "all" and split == "train":
                  _samples = self._paths_and_targets[int(bucket)]
                  _samples += samples
                  self._paths_and_targets[int(bucket)] = _samples
              else:
                  self._paths_and_targets.append(samples)
      for path_and_target_list in self._paths_and_targets:
          for img_path, target in path_and_target_list:
              self.paths.append(self.root / img_path)
              self.targets.append(target)
      return True
  
imports: from pathlib import Path
  from typing import Optional, Sequence, Tuple, Union, List
  import json
  import os
  import torch
  from torchvision.datasets.folder import default_loader
  from avalanche.benchmarks.datasets import DownloadableDataset, default_dataset_location
  from avalanche.benchmarks.utils import default_flist_reader
  from avalanche.benchmarks.datasets.clear import clear_data
label_desc: Use image node_id 4 for calling the _CLEARImage obj's underlying member method code with example usage: obj._load_metadata_new() and returns: True, False, False, False